.::output >> /dev/null::.

where otherwise good ideas go to waste

Excursion into Visual C#

Posted by Nicholas Chen Tue, 16 Aug 2005 16:11:02 GMT

Brains-n-brawn pique me to take a closer look at what Microsoft Visual Studio and the .NET framework has to offer. Brains-n-brawn is a spectacular site with lots of projects which the author has written herself. Because I was really impressed with what I saw, I downloaded Visual C# 2005 Express Edition today to play around with it. I have yet to find out whether this uses features of C# 2.0 as mentioned here. As a college student, I have access to Visual Studio 2003 as part of the MSDN Academic Alliance Program but I am really interested to see how much better C# 2.0 is compared to its previous incarnations.

Well, Visual C# 2005 Express Edition (that is really a mouthful!) downloaded fine into my computer. Surprisingly the download was only about 50MB without the extra documentation but it required a whopping 800MB to install. And this includes only Visual C# Express Edition and the SQL Express Edition. I kind of expected Microsoft to try and bundle something along, and true enough, SQL Express Edition was part of the deal. Also, there was enough hints at ASP.NET and other Microsoft technologies that you could sense that Microsoft was trying really hard to tie you down to their technologies. There is hardly any mention of open source alternatives and how Visual C# interacts with them. Not that it was unexpected. Also, you could optionally not install SQL Express Edition but knowing Microsoft, some of the examples are bound to require it so might as well do it now.

I have never used Visual Studio before because it is very much oriented toward Windows development. So, I was pleasantly surprised with what it has to offer. As usual, there are some annoying feature that I would like to customize but do not know how yet. But there are good features as well. First, its speed. It performs as snappy as Xcode does for code completion and indentation. It is definitely more snappy than the sluggish and memory hungry Eclipse. Also, their integrated help browser is really nice.

Anyway here is what I do not like so far. Of course, I am sure that there must be some way to alleviate these feelings of annoyance once I get used to the program.

  • Crashes when I did CTRL+S!
    I must have done something else but as I tried to save my project, Windows core dumped on me and restarted the computer!
  • Misbehaving code completion.
    For methods that do not expect any arguments, selecting the method from the list suggested should put object1.method1() but right now it puts object1.method. Therefore, I have to type the empty parentheses in myself!
Code Completion
  • No smart typing feature.
    I really like how Eclipse and TextMate auto inserts the closing " for strings.
  • Tabs that do not have an 'x' to close them
    Why have the close button at the far end of the tab row? Would it not be better to have individual 'x' to close the tabs? Kind of what Eclipse has.
  • Counter-intuitive Windows Form "Designer (?)".
    The UI builder is still not as intuitive as Apple's Interface Builder. Maybe because it has a lot more windows widgets that need to be accommodated for. Its properties pane for each widget is really complicated though.
  • Code generator.
    Some people like code generators. I don't really like them especially when they use weird names that I have to refactor personally. Why doesn't it just asks me for the name of the method in the first place?
Code Generator
  • It tries to suck you into using more Microsoft technologies.

And now what I like:

  • Informative code completion.
    It actually shows you how many overloaded versions of the particular method there are.
Overloaded Methods
  • Extensive help file.
    Its help file is really huge. And this is only for Visual C#! You seriously wonder how big the MSDN library really is.
  • Great resources.
    Microsoft would really like to get people to use its tools. Just look at the effort they spend trying to introduce people to these tools: Visual Studio Webcasts, Absolute Beginner videos and if you register and activate your Express Edition product, you get free access to 3 online books on .NET and ASP.NET.
  • Really nice shortcut keys
    Want to indent code? Type CTRL+E and then D. Some people will probably hate this. But I like the fact that you don't have to perform finger circus tricks to hold down several keys at the same time.
  • C#
    The only language that Microsoft created that I feel is worth learning. Visual Basic is kind of limiting. J# is bastardized Java, enough said.
  • .NET
    Like it or not, .NET is going to become the next wave of Microsoft development. If I want to land a job, I better have some grasp of it.

So what have I done with it? Nothing much yet. Did a simple HelloWorld console program. And also a simple web browser following the instructions here. While I still don't like the idea that it is so tightly integrated with Microsoft's other tools, I do feel that learning C# would be beneficial. And it would be nice to actually see what .NET is all about for myself.

Posted in , , | no comments |

Ruby Feuds

Posted by Nicholas Chen Mon, 15 Aug 2005 00:22:52 GMT

I think it is fun to make fun of different technologies at times. For example, almost everyone likes to make fun of Microsoft. And Microsoft is smart enough about to keep their cool and maintain a good PR. However bad things happen when the loyal fans and zealots begin to take matters into their own hands. Rubyist are fun people. So they do what fun people do: poke fun at Java and Python. Obviously, people in the Java camp are a fun bunch too and can take some snide remarks now and then. However, things get really heated up when Ruby on Rails fans begin to take the 10x faster hype too literally and begin bashing the Java camp.

Lucas Carlson has posted a relatively objective and unbiased discussion of why people use Ruby and why people use Java: it's all a matter of taste. Here are some of the heated online altercations that he has conveniently included in his article:

Reading the articles above, you really wonder... how does this benefit anyone?

The way that some people are attacking Bla-bla list was uncalled for. Then again, Geert Bevin should have just kept his cool and not insult Ta-da list as a 600-line monstrosity that is stupid and useless. In the end, what we have now is a duplication of a very simple to-do list: one written with Ruby on Rails and the other with Java with RIFE. So what? Whose gain is it? Ta-da list was created in the first place to encourage users to use an online system to organize their stuff. And to ensnare them to use BackPack, a heavyweight version of Ta-da list. Bla-bla list was created for the sake of trying to demonstrate that Java is capable of creating a simple to-do list, the same concept that Geert was criticizing as stupid in the first place. No one ever doubted for a moment that Java could not do something like that. Heck, almost everything can be done with Java. Geert wanted to prove that he could do it in Java just as easily as David did it in Rails. So did he accomplish that? I think the result is a tie. Well, good news is that Bla-bla list is open source so people can take a look at it and see how it is implemented.

Incidentally, I took a look at openlaszlo and thought that it was pretty neat. I did not like the part where it uses XML to design all the interface. But aesthetically, at least the code for it looks like XHTML. And the snazzy flash interface would definitely appeal to some people.

OpenLaszlo:

"OpenLaszlo is an open-source platform for the development and delivery of rich Internet applications on the World Wide Web"

Downloading and setting up openlaszlo was a snap on Windows. And the examples included did a good job at showing off what it could do. The next time I want to do some fancy eye candy, openlaszlo would be on my list of tools to use.

In spite of all the hate generated, I am glad that why the lucky stiff has this to say:

Once I dreamt I had a robot who was made out of watermelons. He had as skin that green rind that's both dark green and light green. And he didn't care if I helped myself to his abdomen.

He just said, "No, I don't mind. Please."

He had a job helping cars figure out where to go. I got him his own cat.

The worst part was when I woke up and realized all the web framework flame wars going on. Man, what a headache.

[1] For an example of a good nature fun and hilarious poke at Python, look no further than The Least Surprised - The Red Scared.mov (torrent file) by why the lucky stiff.

[2] For a short discussion by Jason from 37signals.com on why hype might be needed sometimes to promote a new technology, please read his comment on Paul Scrivens' blog

Posted in , , | no comments |

Google Print vs. Publishers

Posted by Nicholas Chen Sun, 14 Aug 2005 16:40:51 GMT

O'Reilly Radar > Google Library vs. Publishers:

"Google isn't 'borrowing' the books from libraries. They are partnering with libraries to do something that is very much in line with the mission of libraries, which is to store and share human knowledge. "

Google Blog:

"In October 2004 we announced a program called Google Print, a way for publishers to make their books discoverable by the millions of people who search on Google every day. Shortly thereafter, we added a complementary program to help find all books more easily by partnering with libraries to index their collections too. The goal of Google Print is ambitious: to make the full text of all the world's books searchable by anyone. These books are hard to find now, and for most of them, no full-text search exists. We think that making books easier to find will have a positive impact on the world, and we welcome the challenge."

I mentioned Google Print in one of my earlier posts. Who would have known that a few weeks later instead of applauding Google for undertaking this selfless endeavor, the debate on whether Google's pet project is infringing copyright laws becomes the focus of this project. There are various responses on this but the most compelling, technically-inclined discussion is none other than the one on O'Reilly Radar.

What I really like about Google Print is the fact that you can search through books without going to the library first. Sometimes the books I want are not available at my library and it has to be requested from another library. Before doing so, I would really like to know whether the book that I want is really that good or not. One way to do so would be to search for reviews on Amazon. However, as with all reviews, there are subjected to bias. Also, sometimes I would like to form my own opinion of the book. By just letting me see parts of the book, I could actually get a better idea of what it is worth. In fact, Amazon has something that lets publisher let you see parts of the book. Amazon did not suffer any copyright infringement because they only offer parts of the book: the table of contents, the introduction and maybe the index. Google Print, on the other hand, practically has the entire book scanned in. This, I think, is what confuses the publishers and authors. It is quite impossible to read an entire book let alone an entire chapter from Google Print. Try it. In fact, some of the pages are even blanked out if the publisher requests it. Just because the entire book is online does not mean that web users can access the entire thing.

Also, another potential benefit of Google Print is to let people check for plagiarism. For instance, imagine that you are reading someone's paper and come across a phrase that you are familiar with but not enough to put a finger on where you read it before. Enter the phrase in Google Print and see whether anything shows up. I think that most professors and teachers might find this useful while grading papers.

Here is a quick list of things that I think people can do with Google Print:

  • Research: get the topics you need quickly without wasting time going through useless books. Of course, you could also rely on Google Scholar.
  • Fun: quickly find new books that reference things that you are interested in. Much more reliable than just relying on the keywords that the publisher provides.
  • Preservation: Good books deserve to be eternalized in electronic form for the future generations to enjoy.
  • Google!: Yup, search the books like you would any other document out there. Google search literally changed the way people find discover things on the net. So much so, that the word google has become a verb in most conversations. Google Print does so much more than what a library catalog can do.

As always there are also real reasons why Google Print is not such a good idea. Most of the reasons I include here are paraphrased from Mike Perry. Perry argues that different copyright laws apply in different countries. By having Google Print, it undermines the efforts of protecting copyright laws that apply to different countries. Well, personally, I think the web is generous enough that people can actually procure a copy of the book with or without international copyright issues. Furthermore, Perry argues that it is for the authors and publishers themselves to determine if they want their book to be scanned and put online. It is not for Google to decide. Google cannot just walk into some library and start scanning any book that they want. Basically, Perry is saying that Google should be more conservative and only include books that publishers have authorized and not the other way round where they force the publisher to deauthorize which books cannot be scanned.

Right now there are two different policies for Google Print: the Publisher Program and the Library Project. The Library Project is where Google goes to libraries at Univeristy of Michigan, Stanford, Harvard, NYPL and Oxford and scan the books that are already in the library. This includes both books that are already in the public domain and also those that are still under copyright. For books that are still under copyright, Google Print limits the actual amount that is displayed. The Publisher Program allows publisher to include books that have not made it those libraries yet to be scanned by Google. This option also allows publishers to specify which books they want to scan and which should be left out..

Personally, I think most publishers have much more to gain by letting Google Print scan their books in. True, they might feel apprehensive about letting some company scan their entire works and provide it free through the web. But, if the book is good in the first place, doing so would only introduce a larger audience to it. Of course, if the book sucks then you might lose some sales. But then again, bad books always have other ways of making their sales. For instance, by enticing professors to use them as textbooks!

Posted in , | no comments |

Clever Pen Tricks

Posted by Nicholas Chen Sat, 13 Aug 2005 10:26:32 GMT

Pentix - Tricks: "Here, you will find all the secrets to the tricks that pen spinners are so proud of."

(Via LifeHacker: How to do Pen Tricks.)

Following the list at LifeHacker, I have mastered 5 of the 6 that are advertised. I did not know that they even have names for such tricks. I learned my first trick when I was 14. Someone in school taught the 360 normal to me. After I had mastered that, I learned the the Charge Normal, Sonic Normal, 360 Degree Reverse and the Sonic Reversal. And then today I stumble across the Index Spin. I spent a few minutes trying it out and it seems pretty doable for me. So I hope to master it by tomorrow. It gets easier as you master more tricks.

I am right handed, but the surprising thing is that I am able to reproduce the same tricks (albeit not as beautifully executed) on my left hand without any training at all! This seems really weird but maybe after you teach yourself how to do it, your left hand just imitates it. Seems to be that way for other games that I have tried: badminton and table tennis.

Anyway, just nice to see that someone has actually put up a website to teach people pen tricks. Unfortunately, I was not able to play the videos on my powerbook. I wonder if anyone can actually pick these tricks up by reading. Seems a lot easier when someone just shows you how and you figure out what to do yourself. Some of the instructions are very lengthy and too mechanical. Most of the time, just by practicing, your fingers can figure things out.

Posted in , | no comments |

Interesting site: Lisperati

Posted by Nicholas Chen Fri, 12 Aug 2005 13:48:41 GMT

Finally finished going through the Casting SPELs in Lisp tutorial. Really interesting to find something along the lines of why's poignant guide to ruby complete with its own illustrations and metaprogramming (macros in Lisp). It is also similar to what Python Programming for the Absolute Beginner does for Python.

Another next thing about this tutorial is the use of Allegro Common Lisp via telnet. This would make it really convenient for people who do not wish to install Lisp on their machines.

It gives a nice introduction to what you can do in Lisp. However, I am not sure if someone who does not know Lisp (or any other functional language) can appreciate this tutorial. The author, Conrad Barski, seems to skim over some thing that I view as important. For instance while using mapcar he explains it tersely as:

"mapcar simply applies another function to every object in the list..."
Most programming languages do not provide the luxury of using something similar to mapchar as an underlying characteristic of the language. You could hack it in but most people would not do it this way since the language itself does not expose this functionality.

Conrad's explanation of macros is a bit short too. A bit too short for people to actually grasp the power of it. He also makes defspel as an alias to defmacro because he believes that most people who think they know macros are being delusional about it. Or as he says it:

"Often, when I try to explain the concept of macros to somebody who has only used other languages, I'll get a response like "Oh yeah! There's macros like that in C++, too!". The moment this happens, it becomes very difficult to explain "true macros", because of the semantic load on the word "macro". After all, "true macros" really are a lot like C++ macros, in that they are a way to talk to the compiler with modified code..."

I have not been using Lisp long enough to decide whether the liberal use of list (this sounds a bit ironic since Lisp is all about lists!) to store information is a good idea. For this simple example it seems decent enough since you can easily remember that the second list in the location list tells you where to go next. If we were to do this in Java, using arrays to store such things could easily put you as having Primitive Obsession - not using objects for "little" things as coined by Martin Fowler in Refactoring.

Anyway, this short tutorial did expose me to some Lisp concepts which I have not encountered in the Little Lisper (one of the best books possible on Lisp, I think). And it was rather fun to see how one would use Lisp to create a text based game.

Posted in , | no comments |

Video tutorials: New Way of Learning Programming Languages and Frameworks?

Posted by Nicholas Chen Fri, 12 Aug 2005 06:59:00 GMT

My first encounter with video tutorials was actually with the original Ruby on Rails movie. This version did not have sound at all. Instead, whatever important things that needed to be said was done by typing text into the terminal for the viewers to read. For me, this sort of increased its geekiness level. True, sites such as Lynda.com have been offering video tutorials for many years now. However, (let me rephrase that) my first encounter with free, open-source technology was with Ruby on Rails.

Since then, many have jumped on the bandwagon. Personally, this seems to be a good move. The simplest common sense reason being that you can explain so much more using pictures and videos. It's actually quite hard to understand the common nomenclature that a group of developer uses while dealing with their framework. Secondly, (also another common sense reason), videos can create an great first impression. Joel Spolsky says in his book Joel on Software that even if you have the world's greatest program, you will lose to the other competitor if you do not have enough screenshots. Yup, screenshots are that important.

Some of you might snigger now and think that people who fall for screenshots are nothing more than gullible people who eat hype and drink the kool-aid. Not true. In a field where there are so many competitors, gaining a lasting first impression is really important. And, not every technology out there can do it. I doubt that you could create a Java powered blog within 10 minutes! So, as you can tell, the length of the presentation also plays an important role in determining how popular it will be. Make it too long and people actually lose interest in it all together. Too short, and you leave your viewers wondering is that it?

I guess video tutorials are not limited to teaching people about programming languages and frameworks. Some companies are also using them to teach their users how to use the new technologies. Now, this is an excellent thing because it really shows that you want your users to use those tools. 37signals uses videos for all their web applications.

If you are looking for tools to make video tutorials, here are some:

So, what video tutorials out there are worth watching? Here is my list:

I just found several of them today about Lisp so I have yet to watch those.

Also, if you are looking for some free videos, this Del.icio.us feed has them. Thanks to LifeHacker for the tip.

Posted in , , , | no comments |

80/20 rule - What I never knew

Posted by Nicholas Chen Fri, 12 Aug 2005 05:45:30 GMT

Pareto principle - Wikipedia, the free encyclopedia: "Pareto principle"

(Via How To Work Less And Succeed More.)

Some things that I found interesting:

  • It's known as the Pareto Principle!
  • But, it was first proposed by Joseph M. Juran, so it should be called Juran's Assumption!
  • It is a cause and effect statement; so using it like such: "20% of individuals in an organization perform 80% of the work" is not a valid statement since it is not known that the individuals contributeto the progress of work.

Posted in , | no comments |

It was bound to happen

Posted by Nicholas Chen Fri, 12 Aug 2005 04:58:13 GMT

Hardmac.com : Le "Macbidouille" in English: "The Apple Developer kit version of MacOSX x86 has indeed been fully cracked!"

(Via HOW TO - Mac OS X Running on Non-Apple Hardware.)

No big deal. After all it is only the developer version. It would be interesting to see how Apple is going to prevent people from cracking OS X 10.5 Leopard though. It would be a real pain to see OS X running on a Dell.

Posted in |

How to read blogs!

Posted by Nicholas Chen Wed, 10 Aug 2005 09:19:40 GMT

Ted Leung has some quick advice on how to read blogs. This comes in handy for people like me who read about 600 new entries each day. Some of those entries are really short, such as the ones of the DashboardWidgets Showcase feed. While, others tend to be long and well worth the time reading.

While, you should really read Ted's entry on this, here are a few of my favorite tips. Also, I am glad that he uses NetNewsWire.

  • Use the "mark all as read" feature.
    Sometimes it is easier to just skim through the titles and see what you need to read and what you do not need to. Always trust your instincts. If the entry is really important, other people will probably mention them in their blogs too.
  • Make use of Del.icio.us, Technorati to find those interesting sites
    The web is vast. So let other people help you find interesting stuff. In fact, try using Oishii which only lists the most popular entries. Even better, try subscribing to specific feed from Del.icio.us for instance the feeds tagged with ruby, os x, etc. That way you have less to wade through.
  • Spend time reading thoroughly!
    Bloggers spend time writing. Read and appreciate what they wrote.
  • When unsure, use Safari's RSS feature (this is my own idea)
    Safari RSS is great for testing out new feeds to see if they are going to be worth reading. By putting these feeds on the menu bar, you can quickly see if they are updated regularly. Also, giving them their own toolbar space helps you quickly identify them from the rest of your regular blogs. Once you are convinced that the blog is worth following, chuck it into NetNewsWire.
  • Find out what other people are reading! (also one of my own)
    Popular blogs attract more people.

Posted in , , | no comments |

Kathy Sierra on 37Signals and OSCON

Posted by Nicholas Chen Wed, 10 Aug 2005 08:56:53 GMT

Creating Passionate Users: "37 Signals Passion Review: 9 out of 10 hearts for the 37 Signals folks--as perfect a passionate user rating as I'll probably ever give."

By the way, in case you did not know, Kathy Sierra is part of the Head First group at O'Reilly. While I am sure all the Head First books are great, the only one that I have read is Head First Design Patterns. And, yeah, it is really that good. Not dull and boring like other books that I have to put up with.

I cannot help but agree with Kathy on the importance of passion. With passion, even the impossible seems surmountable. While doing my projects, I find using great software makes the task that much more interesting. And the task seems extremely boring when the textbook itself serves nothing more than being an bulky and expensive paper weight. So, the question that every software company asks is how to make users passionate about your technology. Not many company can do this. Apple is one of the few.

Please head on over to Kathy's page and read about her review of 37signals.

The other posts that Kathy makes is about Ruby. Yup, Ruby is a poignant language in the words of why the lucky stiff. And the massive growth of Ruby is attributed to the passion that its users have. Passionate enough that they want to wear t-shirts with Ruby code on them.

I think creating passion is something that is not going to be attainable using common marketing tricks. The developers need to have a burning desire to contribute to their customers' needs and adapt to their needs. No point in making the world's best satellite if not one is passionate enough about it.

Also, I am glad that Kathy has caught the Ruby passion from David Heinemeier Hansson. Maybe it is the beginning of a new Head First book.

Update: Obviously, there is a fine line between passion and being over-zealous. Paul Scriven in his 37signals: Part 3 and my coffin is being prepared entry says that 37Signals have certainly generated a lot of passion from their users. But their latest endeavors have also generated lots more hype than they can handle. Words such as "Getting Real", "Your life", etc are being littered across their product lines. Well, there is always that stage between being a small company and expanding into a bigger one. Maybe 37signals is in that stage of growth and have to try to readjust their priorities and philosophy. Read Paul Scriven's entry. It has some insightful things on what 37signals is up to.

Posted in | no comments |