12.11.2006

Be a programmer, but not today

This author is pretty much correct, but I have to expand on it a bit. You can't become a good developer in 21 days, although if you are already experienced, you can learn a new language pretty fast. Probably you can't become a good developer in less than 5 years, and that's if you have a natural aptitude for it. Ten years of plugging away at something doesn't make you an expert either. I've played guitar for 20 years and I pretty much still suck at it, but I enjoy it and I am 100x better than I was after my first week of playing. The one thing I think this author and everyone who addresses this question, is missing is the suggestion that learning programming languages means anything at all. If you want to be a good developer, focusing on languages is not the way to go. Everything else I agree with but I would phrase it a different way:

1. Make sure you enjoy it. Good programmers really love coding. They are known for staying up for days on end to write code, because they are so excited about it that they can't sleep. BTW, it's not the coding that keeps me up at night, it's the pursuit of better ways to solve a problem. Very important: be a connoisseur of problem-solving, and methods of attack. A good programmer is just as likely to stay up all night solving a crossword as they are to be coding.

2. Talk. Be social. One thing that I wish would come back into vogue is the development-based user group. I'm talkin about local groups that get together in person. Online forums are great but no substitute for crowding around a screen and actually learning something in a group. Know programmers, meet them in person, have drinks. Get out in the real world and interact. Programmers are known for being an antisocial bunch, but the best programmers love to get together and share.

3. Practice, a lot. Start by building the hello world example to get a feel for whatever you're learning, but then go ahead and dive into something complex. Figure it out along the way, by using #1 and #2. When I learned C++, the first thing I made (after hello world) was a linear algebra class library. One of the first BASIC programs I ever completed was a version of Othello for the Vic-20. Do something like that... if you can't hack it, better that you learn that early. Getting bogged down with things you don't understand isn't the way to go, but learn concepts slowly and build them up into a complex program.

4. Get a degree... if you want to work as a programmer. Having a degree will help open up more opportunities... it's like Boot Camp for higher-level jobs. Your degree does not have to be in Computer Science, just have a degree in something. My degree is in Biology, with minors in CS and Math... this helps tremendously.

5. Debug - a lot. Debug your own code, upgrade your own code after a few years of ignoring it. Read lots of sample code and try to hack sample projects you find. Debug someone else's mistake. Answer questions on forums. Accidentally break something and then fix it. Knowing what can go wrong is half the battle of preventing it. Being able to handle the unexpected is the other half.

6. Know how computers work. You should have knowledge of what it means to write a computer instruction, and what will happen at the electronic level when your code is executed. Know how processors execute instructions, and know how data is transferred around to various parts of the system. Know the parts of the system, and be able to compare their differences and know about their similarities. A hard drive has a bunch of chips in it... what are they doing, and how are they different from the cpu or the gpu or the math co-processor chips? Those are the questions you should have knowledge of... not expert knowledge, but basic knowledge of how it works.

7. Learn 2 programming languages - SQL and something else. SQL is the most commonly used declarative language, and you will need to know it for most jobs. Don't just learn the language either, learn how to use it effectively and learn it along side another language so you can compare the declarative and procedural styles and learn which to use where. Your 'something-else' language will more than likely be obsolete by the time you become an expert in anything, so struggling to learn multiple languages is a waste of time. Learn what you need to be functional now, and focus on other languages when you have time. (So, learn SQL and C#, VB or Java)

8. Without focusing on multiple languages, learn the concepts that are common to all languages. The list from the article (class abstraction (OOP), functional abstraction, syntactic abstraction, declarative specification, co-routines, paralellism) can all be learned within the framework of C# and SQL. There is no reason to learn Lisp simply to understand syntax abstraction, since almost every language supports that feature to some extent. Lisp takes it to the extreme, and IMO, is not a well-balanced language for a beginner.

I disagree about learning an interactive language (although SQL can be good in that respect). I think a developer should get used to the 'code-compile-test-debug' cycle early on. My intern is struggling right now because he doesn't compile often enough... so when he finally does, he has introduced lots of errors, which sometimes compound each other. Learn the consequences of that behavior right up front.

When you are an expert, you will be able to learn a new language in 21 days, maybe less, so the book titles are misleading by making you think they are targeted to 'fast-track' beginners. If you've ever read one of those books, you would see what I mean... it basically starts by saying you need to know the basic concepts of programming as a prerequisite for understanding the book (usually). I learned C# in a few days, but I had years of experience with the concepts first. The "dummies" books are for beginners, and if you take a look at the Java for Dummies book and the Java in 21 days book (both of which I own), you can see that difference. One is focused on learning both the concepts and the language, while the other is focused on quickly learning the language, but assumes you understand the basics already.

So yeah, teach yourself a language in 21 days if you want to, but if you want to be a good developer, you're going to do a lot more than just learn a language or two.

Good luck!
Jasmine

12.07.2006

ASP.Net vs PHP: Love or Money?

This is a response to an email-list question about which is "better", C# or Java for applications, and a separate question about ASP.Net vs PHP.

OK, first the easy question. If you are developing Windows applications, you use C#... never Java. If you need something that is cross-platform, you should probably use Java. The syntax of Java and C# is pretty much the same. The concepts involved are also similar, both being OOP languages with the C-style curly-brace syntax. If you learn one, you will be learning the other as well, they really are that similar. For application development, you need to look at other things as well, such as VB and C++, Java and C# are not the only choices. If you have experience with anything already and you are in a hurry, obviously you should use that.

As for PHP vs ASP.Net... all other things being equal, ASP.Net is 'better' than PHP. However, all things are not equal. It depends highly on the application you are designing, and factors such as budget, size of the development team, existing hardware, and so on. All those things come down to money, and ASP.Net is hands-down more expensive. ASP.Net is also faster and easier to use... IF you understand C# or VB, so you will have to learn one of those languages along side with ASP.Net if you want to be successful. With PHP, you will be able to get up and running for free and with a smaller learning curve, but you won't be able to do as much with it later on. I don't believe there is anything you can do in one language that you couldn't accomplish in the other, so neither choice will limit your possibilities. Here's a brief run-down of the trade-offs...

ASP.Net runs on Windows servers using the IIS web server($$$)
PHP runs on almost any server running Apache. PHP runs on other configurations as well.

ASP.Net is an object-oriented environment.
*PHP is a procedural environment. (Easier to learn)

ASP.Net is easier to debug, but debugging requires Visual Studio($$$)
PHP code is harder to debug, but doesn't require expensive programs.

ASP.Net is elegant and powerful.
PHP requires many workarounds to do complicated things.

ASP.Net requires a lot of system resources and fast servers.
PHP is lean and mean, and runs well on cheaper boxes.

Error handling in ASP.Net is based on Exception handling which is a robust model familiar to many programmers.
*PHP error-handling is tricky, and different programmers use many different methods.

ASP.Net is strongly typed and compiled.
*PHP is a scripting language, resulting in errors that are harder to find.

ASP.Net may be less secure because it runs on IIS.
PHP usually runs on Apache, which is known for good security.

*PHP 5 has addressed some of these issues. It has some better error handling and more object-oriented features.

These decisions all come down to what you know already, what you want to invest, and where you want to go with it. If you know VB or C# already, then ASP.Net is a good choice, but if you're familiar with Javascript, PHP might be a better choice. If money is no object and you don't mind Windows, use ASP.Net, but if you need to run on cheaper platforms, use PHP. If you need a super-rich environment and a robust language with infinite possibilities, use ASP.Net, but if you need to get up and running fast with low cost and are ok with a little extra work for the tough stuff, use PHP.

Clear as mud?
Jasmine

Remember 12/7/1941

At 7:55am, on Dec. 7th, 1941, Japanese forces cowardly (and brilliantly) surprise-attacked US soil for the first time in history at Pearl Harbor, HI and other locations in the islands. Over 2400 people died that day, and it led to a war in which thousands were killed or injured. Since then it has happened only one other time, also leading to a war in which thousands have died. For years, I have used 12/07/1941 07:55 as my "default date" whenever, as a programmer, I needed to set a default date. I do this in the hope that if someone looks at my code and wonders why I picked that date, they will look it up. Actually I hope nobody ever has to look this up. It should be in your mind as indelibly as 09/11/2001. Never forget. Here's some articles.

Survivors gather for what may be their last roll call

What happened on that day

"War is an ugly thing, but not the ugliest of things. The decayed and degraded state of moral and patriotic feeling, which thinks that nothing is worth war, is much worse. The person who has nothing for which he is willing to fight, nothing which is more important than his own personal safety, is a miserable creature and has no chance of being free unless made and kept so by the exertions of better men than himself." - John Stuart Mill

12.06.2006

Yahoo Questions: Am I Pretty?

I like to answer questions on Yahoo Answers, but some of them seem to get asked a bit too often. One of the most popular questions on the Health and Beauty section is simply "Am I pretty?" I understand the need to be thought of as pretty, and I understand that girls are very concerned with it, particularly at a younger age. What I don't understand is why people post this question with no photo, and usually no physical description! "Oh yes, you are a lovely avatar."

At the very least if you're going to ask this question, you should be able to say what you look like. This might seem superficial, this focus on looks, but the question was whether they are pretty or not. That's a primarily aesthetic judgement call, and we need something to go on. The other issue is that whether you are pretty or not has no bearing on more substantial things, like whether you are a good person or not. I think girls need to hear that physical attractiveness isn't as important as they think it is, but don't ask people to make a physical judgement and give them nothing to work with.

12.02.2006

Some of my favorite films

These are in no particular order. Some of them are non-English films, which I indicated. Many of these have elements of alternate sexuality and only a few of them would be appropriate for children (I marked those with a *, everything else is too weird for kids). Links go to the IMDB page for the film.

Hedwig and the Angry Inch (transsexuality, adult sexuality, some violence)

Run Lola Run (German, some violence)

Amores Perros (Spanish, violence, animal cruelty - "Crash" is very similar but not as good)

Silence of the Lambs (violence and sexual abuse)

Ran (Kurosawa) (Japanese, violence)

Rashomon (also Kurosawa) (Japanese, mild violence but it's off-camera, might be ok for kids - a great exploration of the effect of point-of-view)

Akira (anime) (Japanese, violence and bad language)

*Metropolis (Japanese, anime - somewhat similar to the 1927 film, but claimed to not be a remake of that one)

*Metropolis (1927 sci-fi silent film - there is a DVD of this with music and some weird colorization)

*Princess Mononoke (Japanese with a good English re-dubbing, anime)

Zatoichi: the Blind Swordsman (Japanese, violence and alternate sexuality)

Far From Heaven (might be ok for kids, gay situations, but no sex that I can remember - you will love the '50s fashions in this one)

Brokeback Mountain (about 15 seconds of gay sex, would be ok for older kids)

The Crying Game (transvestite, brief male frontal nudity, violence)

Star Wars (A New Hope and The Empire Strikes Back... the others weren't that good - violence)

The Big Chill (probably OK for kids, but hard for youngsters to understand)

Schindler's List (has some nudity and violence, but should be ok for kids)

Boys Don't Cry (not a well-made film, but great subject matter and a true story - violence and female-to-male crossdressing and sexuality - scared the hell out of me)

Shiokari Pass (Japanese, explores faith - great tearjerker ending - might be hard to find)

There's so many more... I've been watching a lot of foreign films lately. This week I saw Solaris (Russian from 1972, kind of boring), and Yojimbo (interesting, funny, but not as good as some of Kurosawa's other stuff). I like Franke Potente (Run Lola Run and The Bourne Identity), so tonight I've got The Princess and the Warrior. I love movies :)

[addendum]BTW, The Princess and the Warrior is very good

 
hit counter script