Live data from Hacker News

How to become a programmer

news.ycombinator.com

31–37 of 37 posts

Re: How to become a programmer

#31
It's always exciting to hear someone eager starting out. The only secret is to keep being interested and not give up on yourself. If you're looking for a fun problem to solve, try writing a brute-force sudoku solver. That could be fun in the context of a webapp. I'd also recommend getting a solid grounding in SQL and designing schemas. You can do a lot of this by brainstorming applications and then working out how you'd design the schema. You don't actually have to write it, and the process can be a good way to get a feel for whether an application will be simple or hard.

Re: How to become a programmer

#32
post #11

"Once I figured it out, it was great, but I was beat. Is there a better way to learn programming?" No. You found it.

Think of it this way: learning a programming language is learning a completely arbitrary and made up language that is used to talk to a hunk of 80 million silicon switches and try to convince those switches to do something complicated. It's going to take a little while to learn that language. When I first started studying CS at school, I thought that there was some secret knowledge that the true hackers had that allo…

Actually your analogy is very accurate and just as after you reach a certain level of fluency in a new language you stop thinking about what you are going to say and how to compose the sentence you want, and just say it.

Re: How to become a programmer

#35
post #24
post #19

Earlier quoted context omitted.

"You don't have to write a novel and explain that you are adding 2 to variable i" Better yet, don't name your variable "i". Name it something like "PartCounter" or "CustCtr". Then you won't have to write many comments. Your code can be largely self-commenting. As a general rule of thumb (IMO), never name any variable with less than 3 characters and never allow one variable name to be completely contained within anoth…

and, as always, take other people's rules (of thumb) and guidelines with a grain of salt. there's almost always someone who will argue the opposite, all, or part of the time. ( i for one will continue to name my counters i :-) )

A long time ago I started naming mine 'ii' or some variant of 'index' for exactly the reason mentioned (wouldn't confuse search/replace).

Although I often try to avoid using counters at all via foreach or recursion.

Re: How to become a programmer

#36

PHP is probably a pretty good place to start. I built myself a couple web apps with it years back, having never coded anything previously that wasn't on a TI-82. It's a good introductory language to web programming. I'm now spending my time on RoR, and I don't think it's a very good language for starters. It's just too much to learn at once.

I guess I should mention that there may be something to the argument that you'll probably want to end up with RoR or Python/Django at some point, so maybe you should start there. But at the same time, if you're not familiar with OOP or MVC, or even basic DB programming, it might just be overload.

Re: How to become a programmer

#37
post #26

Earlier quoted context omitted.

There is one thing that PHP has going for it as a first language: You can do "cool" things with it almost immediately. It is like making an animated drawing back in the day in [whatever version of] Basic. Most into tutorials start "this is an int, this is a char, this is a variable, etc." Before you even get to anything interesting you are already dozing off. With PHP, however, you can hack together your own blog/web…

This is so true. The starting developer will feel an immediate response, without (typically) first having to install/configure the webserver, compile code, setup deployment scripts etc. PHP is definitely not a good language to start programming at first (for that I'd recommend Scheme, ala SICP) but it's definitely a great one for a My First Website project.

I just bought "The Little Schemer." It is rocking my world.
Post reply on HN