RSS
people

My Experiments with AWS – 1 : Basics of Amazon Web Services

I have been with dreamhost for 1400 days before I opted to move everything to AWS. I did not had any particular problem with dreamhost. They are good and their support is even better but I wanted to explore AWS, move away from my comfort zone of hosted services, get my hands dirty and learn things in the process. I will be documenting the solutions of the common problems I face and their solutions.

Starting with the basics – AWS pricing structure can be a pain to understand for normal users as they charge for storage, computation, bandwidth etc. They provide a free tier for first year for new customers – which is a plus. For normal usage, one will not even pay anything for first year.

read more »

2 Comments | Tags: , , , , , , ,

Basic regex reference

OperatorPurpose
. (period)Match any single character
^ (caret)Match the empty string that occurs at the beginning of a line or string
$ (dollar sign)Match the empty string that occurs at the end of a line
AMatch an uppercase letter A
aMatch a lowercase letter a
\dMatch any single digit
\DMatch any single nondigit character
\wMatch any single alphanumeric character; a synonym is [:alnum:]
[A-E]Match any of uppercase A, B, C, D, or E
[^A-E]Match any character except uppercase A, B, C, D, or E
X?Match none or one capital letter X
X*Match zero or more capital Xes
X+Match one or more capital Xes
X{n}Match exactly n capital Xes
1 Comment | Tags:

To be a good web developer

  1. Be a good programmer first. (Point 2 to 14)
  2. Understand the pointers, memory allocation and all those low level ‘outdated’ things. (Yes, even when you program in Java)
  3. Learn the sorting alogrithms – You probably never going to write one, as your language has a built-in function for the job. But, Do it and understand the time and space complexities of each.
  4. Remember the good old data structures like Linked Lists, Trees, HashMaps – even when the language provides abstractions for these.
  5. Learn to use Objects properly.
  6. Learn when not to use objects. Appreciate the fact that functional programming paradigm has its positives.
  7. Seriously – seriously – even when it feels insignificant – seriously – comment your code.
  8. Be comfortable with point 14.
  9. Never stop learning – learn from everyone.
  10. Be open minded. There is always a possibility of better solution.
  11. Use IDE. Vim and EMacs are geeky but little help while writing code does not harm anyone. Pick any – Netebeans, Eclipse…etc.
  12. Always keep a track of your code. Use a subversion system. (SVN/git)
  13. Be platform agnostic.
  14. Be comfortable with point 8.
  15. Learn HTML – it’s NOT a job below your standards. Afterall, whole point of your application is to output HTML.
  16. Understand symantics in markup. Even though you can make h1 look like p and p look like h1 – Do not do that.
  17. Learn to make h1 look like p and p look like h1. Yes, I am talking about CSS.
  18. Learn JavaScript, detect those memory leaks. Specially when you want to be a ‘backend’ developer.
  19. Seriously, its okay to pick one JS framework (jQuery, mootools, yui – whatever) and be good at it than to know little bit of every framework.
  20. Never forget the config files. Always read them. (httpd.conf, php.ini, redis.conf – everything)
  21. Think about optimization and caching – always. You do not implement optimizations later.
  22. Write a single deployment script. Deployment should mean pressing ‘enter’ once.
  23. Learn SQL. SQL is not only about select, insert, update, delete. Understand transactions, triggers, views – use them.
  24. Keep an eye for NoSQL. (Point 9)
  25. Use firebug on daily basis.
Note: These are my personal opinions and I will keep updating it, as I understand more and more things. Any suggestions is welcome.
5 Comments | Tags: , ,