August 12th, 2009 § § permalink
Ladies and gentlemen of the class of 2009:
Use dynamic languages.
If I could offer you only one tip for your future programming careers, dynamic languages would be it. The long term benefits on dynamic languages have been proved by thousands upon thousands of programmers, whereas the rest of my advice has no basis more reliable than my own admittedly limited experience.
I will dispense this advice now.
Enjoy the power and expressiveness of homoiconic languages. Or forget they exist. You will never really understand the power and expressiveness of homoiconic languages until you have spent forty hours straight debugging some heisenbug. But trust me, twenty years from now, you’ll look back at all the code you have written and wish you had used a homoiconic language. You non-homoiconic code is elegant, but not that elegant.
Don’t worry about the LOC of your programs. Or worry, but know that measuring lines of code is as effective as trying to count parenthesis in Lisp. The real troubles in your programming career will come from metrics that never crossed your mind, like the number of type declarations in your classes, the kind that will make your curse the compiler for its pretense safe type system at 4am in some caffeine-driven code marathon.
Write one line of code everyday that scares other programmers.
Comment your code.
Be careful with other people’s code. Don’t put with people who are not careful to keep your shared code as easily maintainable as when you wrote it.
Don’t use TODO, HACK or FIXME comments in your code.
Don’t waste time on programming languages wars. Sometimes your favorite language is ahead on the TIOBE index, sometimes it’s not. The race for delivering the code is long, in the end, only your lines count.
Remember the forks and patches your code receives. Forget the innuendo about its quality. If you succeed in doing this, tell me how.
Throw away obsolete documentation. Keep old beautiful code.
Don’t feel guilt if you still haven’t learned Assembly. The best programmers I know only bothered to learn it when they really needed it. Some of the most incredible programmers I know make a point of not learning it.
Drink coffee moderately. Be kind to your hands. You’ll miss them when RSI comes knocking.
Maybe you’ll write a compiler, maybe you won’t. Maybe will write a Linux kernel driver, maybe you won’t. Maybe you’ll write artificial intelligence systems in ML, maybe you won’t. Whatever you do, remember any of those accomplishments is as relevant as discussing whether Emacs is better than Vi.
Enjoy your test suites. Use them in whatever way you need. Don’t be afraid of what people say about TDD or of what people think of BDD. Sanity when developing is the greatest tool you’ll ever have.
Celebrate every successful build even if you are alone in the datacenter and nobody can share your happiness.
Write a Makefile at least once, even if you have never to bother with writing one again.
Don’t read Microsoft’s technological magazines, they will only make you despair of seeing beautiful code.
Get to know the big names in computing. You will miss knowing what Alan Turing and Donald Knuth did some day. Be kind to your fellow programmers. In the future, they will be the ones who will help you find the proper libraries when you need.
Understand that languages come and go, but that there are a few you should always keep yourself proficient in. Work hard to understand the features of each language you come across because, the older you get in your career, the more you will need to understand the purpose of certain features and techniques.
Write a couple programs in C, but dump the languages before it makes you believe manual control of memory is good. Write a couple programs in Haskell, but dump the languages before you come to believe that cryptic error messages are tolerable. And remember to learn a new language now and then.
Accept certain inalienable truths: market languages like Java and C# suck, dynamic typing is better than static typing, and your programming career will end someday. When when it does, you will fantasize that when you were a hot shot programmer, market languages were not that bad, that static typing was safer, and that your career would never end.
Respect those whose careers have ended because they contributed for you to be in the place you are now.
Don’t expect anyone to teach you to be a better programmer. Maybe you will have a mentor. Maybe you have access to better manuals. But you never know when either one might run out.
Collect a reusable code library but don’t add too much to it or you will find, just when you need it, that most of the code there is too terrible to use.
Be careful whose algorithms you use, but be patient with those who created them. Algorithms are like pets. Everybody thinks theirs are trustable, clean and fast but the truth is always different from that and they rarely are worthy the bytecode they generate.
But trust me on the dynamic languages.
Best enjoyed while listening to “Wear Sunscreen”, of which, I hope you notice, this text is an obvious parody.
March 11th, 2006 § § permalink
My name is Ronaldo Melo Ferraz, and Reflective Surface is my personal weblog. When I write here, I write as a private citizen, and I am solely responsible for what’s written. My current employer has no affiliation whatsoever with this weblog.
The name of the site comes from a common Web phenomenon: the reflection of information. When I was searching for a good name for my personal site, I thought about thousands of names but quickly found out that most good domain names were already taken. (To tell the truth, not so quickly. I only gave up after I had tried almost all Greek and Latin words in my lexicons.) At the time, I was thinking about how weblogs are much like a room full of mirrors that reflect information back and forth ad infinitum, and thought about the name Reflective Surface. Coincidentally, I came across an entry in a weblog that had just been born at the time, and in the entry the blogger talked exactly about that. The rest is history.
A few personal bits
I’m a 28-year-old Brazilian, living in Belo Horizonte (Beautiful Horizon), capital of the state of Minas Gerais (General Mines) and the country’s third-largest city — which is also were I was born and raised.
Now that you know that I’m not a native English speaker, don’t worry about any spelling or grammar errors you may find in this site. I read somewhere that anybody who started learning a foreign language after infancy will take about 32 years to master the language completely. I still have more than three quarters of the way to go. Never having taken classes, I’m learning as I go–mistakes included.
I’m happily married to beautiful Alessandra (who I still couldn’t convince to have a weblog) and have a son, adorable Marcus. I’m a Christian — a Baptist to be exact.
My interests are too diverse to enumerate, so I will list only a few.
As a programmer, I’m obviously interested in all things relating to technology. I’m mostly interested in programming languages, compilers and related technologies. In the future, I plan to publish a few projects of my own in this site.
Also, as you can see from one of the categories in my blog, reading is one of my passions. I try to read at least ten books each month. I miss the time when I was younger and still could read one or two everyday. I read anything I can get, but I tend to read much more science fiction and fantasy. I don’t have favorite authors, or rather, every good author becomes a favorite.
My tastes in music are very eclectic, but I prefer rock. My favorites artists are Petra, Dire Straits and The Alan Parsons Project. I’m currently learning to play the guitar. Two months ago I bought a Danelectro DC-3 from a friend. It’s an incredible sounding guitar that already gave me countless hours of pure enjoyment.
Well, I guess that is all I can indulge to write about myself. For futher information, jobs offers, or anything else, you may contact me at email@example.com.
December 23rd, 2004 § Comments Off on Merry Christmas § permalink
A merry Christmas to all readers and visitors. If you don’t celebrate Christmas, a merry end-of-year to you too. 😛
As always, updates will be erratic here until the next year. Have a good time.
September 5th, 2004 § § permalink
Sbyybjvat Eboregb’f rknzcyr, gb nibvq gheavat guvf ragel vagb n ubarlcbg sbe crbcyr frrxvat Tznvy vaivgrf, V’z bofphevat guvf ragel n yvggyr ovg. Gur gjb svefg crefbaf gb fraq na r-znvy gb ebanyqbsreenm @ lbh xabj jurer trg na vaivgngvba.
January 30th, 2004 § § permalink
My hosting provider has just informed they will be changing the server in which my site (along with those of many of my friends) is hosted. Motive: none, except that they want to change it. As a result, the site may become unavailable for some time in the next few days. In fact, considering the recent level of service of those guys, it will probably be much worse than that.
To my (few) faithful readers: I’m trying to solve this chaotic situation for some time now, but fear has prevented me from doing I should have already done, which is moving away from this hosting provider. I apologize. Thanks for your patience, too.
In a good Christian spirit, I think I should send an e-mail to my provider thanking them for all the troubles and headaches I endured in the last few months. It’s certainly helping me to be more patient with everybody.
January 20th, 2004 § § permalink
Just the other day I was doing a favor for a friend of mine who owns a marketing company when I stumbled upon a thing that showed once again how Windows is much more unsafe than Linux or any other decent OS if installed with its default options.
Since that friend doesn’t know much about programming, she asked me to create some scripts for the site of one of her clients. The site is hosted in one of the biggest hosting providers in Brazil, both in terms of customers and infrastructure, which shall remain unnamed to protect the not so innocent. At some point, one of the scripts gets a file uploaded to the server and forwards it to a specific e-mail address. So far, so good. It’s just a question of hooking two components together.
However, when I started creating the script, I found that I didn’t know where to temporarily store the files, before they were sent to the correct e-mail address and deleted from the server. It was a bit past midnight, and I had to way to ask support. Since I was using a programming language that has no command to retrieve the current directory, I just used the simple and dirty way to find where the file is running from: I caused an error. With the directory at hand, I tried to save a file to it. It worked. Considering that that language also lacks any kind of protection against that kind of thing, I wasn’t bothered. So, just for fun, I tried to save the file at C:\Temp. To my surprise, it just worked.
All right, accessing C:\Temp isn’t a big deal, even though it wasn’t supposed to happen. So, I decided to go further, and tried to access C:\WINNT. As incredible as that may sound, this directory was completely accessible, with full reading and writing rights. If that is not a security hole, I don’t know what a security hole is.
In short, a user with a simple FTP password can easily compromise the machine, which is part of a much bigger cluster. Even a user with proper access to the site can easily damage the machine by mistake. And some people still say Windows is safe.
January 15th, 2004 § Comments Off on Vanished § permalink
All reports regarding my assimilation have been largely exaggerated. 😀 Contrary to what may seem, I didn’t stop blogging. It’s just a project with a tight deadline that is approaching faster then I’d like. As it happens with this kind of project, extra time and weekends at work are the norm. I hope to resume normal programming here anytime soon.
December 4th, 2003 § Comments Off on How to Design (Declarative) Programming Languages § permalink
A thread in the ll1 mailing list has a list of questions to ask yourself when you are designing a declarative programming language. A good read for people interested in the subject.
December 2nd, 2003 § § permalink
Via Scoble, comes the news of an incredible statement by Steve Ballmer, the second in command at Microsoft, saying that Windows costs about US$ 12 a year, considering the average life cycle of a computer. As James Robertson commented, it’s simply too amazing a allegation even to begin to make fun of. I feel like crying instead.
Even considering that you get a discount when you buy Windows bundled with the computer — something that, here in Brazil, it’s not true in most cases — Ballmer’s claim is a far cry from the truth. And it’s easy to show why.
Less than two weeks ago, I was in a computer store in a shopping mall near my workplace. My coworkers and I were checking the price of anti-virus software, and, just for curiosity, we asked about the prices of Microsoft software. Windows XP Professional was priced at R$ 1900 (US$ 664), and Office 2003 was even more expensive, being priced at R$ 2500 (US$ 874). Together, they cost R$ 4400 (US$ 1538).
I will admit the prices aforementioned are a little bit above the market’s average. Nonetheless, that’s the price you will find in many computer stores. Even considering the four years of use Ballmer mentions in the article, that’s a long way from US$ 12 a year.
Now, let’s take a look at the economic situation in Brazil. The minimum age is R$ 240 (US$ 84), which means Windows itself costs almost 8 times what a average works gets monthly here. Did I hear somebody say luxury item? Heck, you can buy an excellent computer here for the price of Office 2003 alone. It’s easy to see how absurd Microsoft prices are for the Brazilian reality, and how ridiculous Ballmer’s claims are.
To go further, taking the combined price of Windows and Office you can buy a good used car here. In fact, together they cost about one third of a brand new car. Worse yet, in Belo Horizonte, the city in which I live, that price would buy you one tenth of a nice, albeit small, house.
And I’m not even going into the details of how much the problems Windows gives you cost yearly (virii, trojan horses, etc.)
I don’t know what Ballmer was smoking when he was interviewed, but it was strong. And the most amazing thing about Windows and Office is that for that price you get only the OS and a bloated office package — nothing else. On the other hand, a normal Linux distro ships with more than 2000 different application, including various office packages, games, utilities, connection and sharing tools, Web servers, database servers, and scores of programming packages for a minimal price — in many cases, just the price of the media.
Do I need to say anything else?
November 26th, 2003 § § permalink
In my previous entry about SCORM, I presented some considerations about the implementation of its API on a LMS, talking about both its client part, which runs on the browser, and the server part, which runs on a Web server. The entry was an overview of the issues found in the implementation, but it didn’t look into the fine details of the process. This entry tries to complement some of the information found in the previous entry, explaining some details of the server-side implementation.
» Read the rest of this entry «