Hacker Newsnew | past | comments | ask | show | jobs | submit | greenmanmax's commentslogin

From a marketing point of view: Great work! I really like the "slate" logo. The only thing i didnt' like that much was the font: Espacially the "c" looks strange. But the rest: Just nice! I would hire you, if my name was ballmer ;)


Hi, (robo)Martin, My opinion on comments is, that they are extremely useful for functions, classes (f.e. javadoc). It is essential to know, what a part of code does. In the function body, I think it is much more important to use meaningful variable names. I mean: Do I really have to comment a variable like "numberOfUsers" with a statement "The number of users"?


Of course, variable names need to be really descriptive. And, no, they don't each need a comment. Here's an example, in a recent app I had to slice an image based on a given number of rows and columns. The variables were named:

  int image_rows;
  int image_columns;
The actual code, with comment, went something like this:

  // These variables will determine how the image is sliced.
  // They are bounds-limited in code to max values imposed by hardware and 
  // defined in configuration_settings.h
  int image_rows;
  int image_columns;
A year from now I won't need to read far into the code to understand what they do.


My tip of the day: work hard in solitude - stop reading Hacker News :)


Hi bad_user and thanks for your comment. I don't really know why you're calling it "sensationalist yellow junk". In my eyes its news and therefor worth beeing on "hacker news". Have a nice day.


Cool thing! PHP is really great if you want to get things done in a quick-and-easy way but it also tends do get a little messy! This article is also good for people (like me) using PHP in a pure functional way (=no classes) - You others may now boo :)


What you actually meant is procedural way.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: