Monday, March 26, 2007

Can Codeplex make your code prettier too?

Disclaimer: the following is a part of comments that I posted on Josh Ledgard's new post Google makes your code prettier.  Since I have some pretty bad experience with posting long replies on MSDN site now I always save a copy.  I thought that since I haven't updated my site for a while, I will also post a part of my response here.

I took notice of Google Code a lot earlier than Codeplex because of its Summer of Code project. It is obvious that Google is very good at garnering the attention of (young) developers and keeping its reputation as the coolest place for developers.  For instance, on reddit the prettifier got 259 points.

Instead the last entry of FoxPro got released on CodePlex, got almost no attention.  (P.S. I always think that MS should release VB6, the latest obsolete/non .NET version of VB to codeplex.  VB6 is a lot more popular than FoxPro...)

It is not a popularity contest, but in general Google Code is the place where cool ideas come up.  Even if I have a cool .NET project I want to publish SourceForge is probably a better place for now.  Codeplex only hosts MS-sponsored project and is a PR machine.  That's the impression I get, is that true?

Below is my comments on Josh's blog

1. what makes google code more popular than codeplex besides publicity? well first of all they did a fine job at publishing their ideas. second, googlers are allowed to devote some of their own time into their own interesting projects. I guess it's not possible in MS but, I am sure you guys have written a lot of cool (little) tools that won't monetize but will be very useful. So maybe it's time to encourage Softie to publish their ideas (esp the ideas/prototype that aren't funded) into codeplex.

An open source playground where Softies (some of the smartest and most experienced coders in the world) publish their own cool gadget will get a lot of attention.

2. Re-amp the interface of codeplex: now it is a bit lame. The search bar should be in the middle, and i still prefer a directory of project types instead of popular tags. Popular tags should go to the right side (much like channel 9 where it lists the videos based on popularity).

3. What is the goal of codeplex? A place where "ideas" converge or a place where "Microsoft-published" ideas converge? If it's the latter then codeplex must expand to allow Java/Firefox plugins/eclipse plug-in to get hosted.

4. One thing that Google Code does better is to designate a person (not a no-name PR announcement) to introduce a cool idea in code.google.com. Too bad they haven't done it for their Open Source projects. But this is an opportunity for codeplex. Codeplex really needs a host who can communicate important ideas to the community. It's most vital for important projects like IronPython to garner attention!

5. although the MSDN website is very overloaded, it saddens me to not able to find a (obseravable link between msdn and codeplex. That really signifies the "importance" of codeplex within MS' priority list. If MSDN is the focal point of Windows developer, then it should be an entry point to codeplex, no?

Update: the comments never made it to Josh's blog.  It keeps rejecting them and I guess my voice wouldn't be heard :P

Thursday, March 22, 2007

COMP 102 Temporary Wiki

I am too lazy to have a wiki and newsgroup is something that is obsolete anyway. So for all the helps you need, please post it here, and I will answer them to the best of my ability.


Help for assignment 4:

I have received some questions about question 2 in the assignment, so I will post some clarifications from the instructor here:

From the instructor:

The "model the peers" part for 4pt is about describing how they modelled the
network, and why. This can be done on the graph, or in a few sentences. The
second part for 2pt is for only drawing the graph itself.

In this question we are talking about a P2P network where peers talk DIRECTLY
to one another.

Hope it helps..

Update: I will not be here at 1 pm but I will be back at 2 so the office hour is delayed for 1 hr.


Help for assignment 3:

1. Truncating an floating point:

Try: var truncated_value = Math.round(my_initial_floating_point_val)
reference: http://www.javascriptkit.com/javatutors/round.shtml for help.

2. loop to infinitity?

Take a look at how to use break in loop.
Cheap shot: try, while(confirm("you wanna keep playing?"))

Update: skeleton code of question 2 is available! Check the TA page!

3. Hard Way to code Tic-tat-toe.

I tried to put up a sample code in the blog but it interprets the code as valid HTML and tries to parses it. So i could not display the code probably on the blog. Let me put it this way: if you use HTML table it will requires a lot more knowledge than what you have learned in class. Better to keep things simple by not touching the HTML layout at all.

Of course, if anyone is really interested in doing that, then reply here and I will try to create the sample code.

4. Multidimensional Array

Unlike Ruby or Python, there is no built-in support for array / list type in JS. Everything is treated like an object.

Therefore, to declare a 3x3 2-dimensional array you need to do this:

a = new Array[3];
a[0] = new Array[3];
a[1] = new Array[3];
a[2] = new Array[3];

Well you get the idea. Not the most elegant way to construct it and I will avoid it as much as possible.

Again, please post your questions HERE instead. I don't check my email too often so please use this wiki. It also benefits others who may have the same questions in mind.

Update: I have made the following list to Greg as the submission format requirement. But I have not received any news so I will post the following as the preferred guildline for this submission.

1. Each assignment should be submitted electronically through a ZIP file.

(Very important!!!) The name of the zip file should be: c102-a3-lastname-firstname.zip . Files not adhered to this format is not accepted.

2. The zip file MUST contain 3 html files with the following names:

bi-converter.html
tic-tat-toe.html
mandelbrot.html

I will run a script that tests for these three files. File names other than the ones I specified will not get tested.

3. Each file MUST COMPILE: a blank screen means automatically a zero for the specified question.

4. Each script MUST contain a comment that specifies the name of the author, and if they used the skeleton code provided. Submissions that use the skeleton code but did not specify the source is considered plagiarism.

5. All files MUST BE SUBMITTED to this email address: iyuen@cs.mcgill.ca or isaac.yuen@mail.mcgill.ca . Submissions to any other places will not be accepted.

6. Submission deadline March 27th 11:59 pm.

Wednesday, March 21, 2007

Best language to teach computer newbies

I have been TA-ing an elementary computer class for this term.  Initially I chose the class because I thought: "the basics of the basics, how tough (to mark the assignments) can it be?"  Turned out that I was very very wrong.

Well I have lots stuff to say but I will keep my mouth shut for now, until everything is done.  After all, I think I have not done a perfect job, although I tried to help the students as much as possible.

But recently the students (who are mostly computer newbies who are majoring in Art/Media Studies) are asked to do a programming assignment.  Guess what language they are asked to program in?

Choices:

A. Python (dynamic language, the one that I use for fun programming)

B. Scheme (default language to learn for MIT undergraduates)

C. Java (unfortunately the most popular language for now)

D. JavaScript (the backbone of Ajax and the language of tomorrow)

Answer: out of all the languages available, the students are asked to program in D!

Disclaimer: it has nothing to do with the instructor of the course.  He's a good man and does not have a choice.

Wow, I'm amazed by the foresights of McGill SOCS.  They must have read the Steve Yegge's Next Big Language and decided that Web+dynamic language+OO = the language that everyone should learn tomorrow!  Let's go with JavaScript.

Problem: the students don't even know how to host/where to host an HTML page and you expect them to know how to use JavaScript?  And program a Tic-tat-toe?

Honestly, I didn't know JavaScript maybe until last year (although it wasn't hard to pick up!)  Out of all languages that have runtime-environment, and more simplified data structure and syntax, why would they choose JavaScript!

If you really like the Java syntax then why don't just go for Java instead?  Well, yeah, the declaration is not something that you can learn in a day and most of the students would probably spend 90% of the time trying to compile the code.  And when they submit the assignment and it doesn't work, you have to deal the "but it compiles" questions.  And Java is pretty much useless for day-to-day use.  With JS at least if you have your own site you can do some small JS tricks or write a greasemonkey script to make your site better.  But, JS does not survive on its own and to use it the students will have to learn all the intricacy of HTML and DOM!  Not that they are hard to learn, but just not something you expect from students who just want to take an easy course for a good grade.

So... what's your language for teaching the basics of programming to newbies?  Do you agree with me?

Saturday, March 17, 2007

Summary and thoughts of the AOSD Panel

I'm now back in Montreal. I still have a post about AOSD Conference Day 2, which I hope to publish soon. But I left my notes at home and there were some really witty John Lamping's quotes (mostly Googly and AOP unrelated) that I believe I must share. So please be patient...

But the AOSD Panel (Title: Panel: Beyond AspectJ: AOP languages in 2017) was pretty entertaining and was one of the highlights in the conference. Although the panel discussion eventually degenerated into a pointless debate between 1. dynamic v.s. static AOP languages and 2. how to involve the industry, there were some provoking thoughts in the first 30 minutes when each panelist presented their ideas about the future of AOP languages.

Theo D'Hondt, the fathor of logical pointcut: In what I think as the perfect prelude of the panel, Professor D'Hondt launched his attacks on two problems he sees in most young AOP researchers today: 1. too much concerns of the relevancy in the industry, and 2. obsession with bytecode (both are pretty evident in the AOSD conference). It is really up to the industry to decide if the ideas are applicable, and researchers are the worst ones to make a judgment on that. He also emphasized the most important factor in research should be the originality of the idea, not about its appeal to the industry (“Amen” from Gregor Kiczales). Not surprising from the place that produced logic pointcut (in Prolog), and other relatively abstract ideas. Although what he said was nothing new, it was refreshing at that time when most people think about how to extend the pointcut-language/annotation to make AOP more appealing to the industry and increase the adoption (maybe more funding). Although I wasn't able to attend as many research presentations or demos as I liked, I witnessed there were a lot of works that tried to replicate the AOP idea into other languages or platform, or tweaked the VM to do other crazy ideas. Has AOP reached maturity yet that no other more new ideas can be proposed and we should only be extending/porting AOP now? What kind of questions that have been asked but deemed too difficult to answer right now?

I also had some reflections on my own work too: is my idea of refactoring bits and pieces of program elements lacking in originality and I'm merely redoing the work that has been done (albeit separately) by others? I guess its a bit late to change now, but I think I am more inspired than before on the AOP idea.

The rest are summaries from other featured panelists:

Ramnivas Laddad, the "father" of AO refactoring

  • AspectJ is sufficient for industry and it is getting more prevalent
  • Java is not the most ideal platform for AOP. Future development should aim at another language that uses the JVM (i.e. Jruby, Jython)

  • “obliviousness” does not matter as much as we think

  • Criticizing JHotDraw as the primary AOP benchmark: shouldn't we use more real examples and a larger project rather than something that nobody actually uses? (Ya-hoo! That is one of the best quotes in the conference.)

  • Trend of language development: AOP is in fact an evolution of most significant languages features: procedural → functional → OO → AO. Future AO languages should not replace these ideas.

Hidehiko Masuhara from Tokyo U: In a series of slides, Sensei Masuhara from Tokyo U expressed his ideas of crosscutting indicators:

What AspectJ provides: modularization mechanism by using names (i.e. lexical data such as method names, simple type names). Therefore, names are crosscutting indicators (metadata where crosscutting may occur). AOP moves names from a metadata-level (a string) to a base-level (such as a pointcut descriptor in the code level). However, names is insufficient and in the future we should aim to move more crosscutting indicators (i.e. Types) to the base level.

Klaus Ostermann, creator of Caesar:

  • AOP should move from localization to modularization (Caesar, anyone?)

  • Should we keep dragging on with weaving? AOP is NOT code transformation!

  • Real modularization should involve removing secondary functionalities into separate modules. (Again, Caesar???)

  • We don't need anymore semantics sugar into AOP languages such as AspectJ.

Finally, Yannis Smaragdakis of U Oregon:

What is AspectJ today?

  • An advice language

  • A static analysis language

  • Intrusive transformation language

  • Automata merging language (through cflow()...)

But... AspectJ clouds the vision! A general purpose AOP language should be like AspectJ but has more power and yet more discipline (an oxymoron?). We should pursue something that cannot be done in AspectJ, such as having aspect co-existing with normal class, not as a special oblivious class.

However, he then got into his latest idea called Morphing (see ECOOP 2007) and spent quite some times explaining his ideas. As much as I liked inspirations, I really think that the panel should not be a place for idea advertisement and at that point I really didn't keep notes anymore.

Great quotes that I remember from the panel...

I believe that static language...is dead” -- Dr. Theo D'Hondt

If you guys don't use the tools that you developed, shame on you!” -- Dr. Prem Devanbu , in questioning if it is valid for researchers to pursue an idea, then leave it in the dark and not touch it anymore...

I use it... when it is appropriate...” -- Klaus Ostermann, in responding to the previous quote...

Anymore that I missed?


Thoughts and suggestions on the future panels

As much as I enjoyed the discussions in the panel, it was evident that it got really sidetracked from the original topic and the audience only had a good laugh. The direction of AOP language still doesn't get any clearer (or closer) than before. I think it's the problem when you packed a whole bunch of experts (much like the joke about packing a bunch of evangelicals) in the same room.

I genuinely think, if the panel wants to be something more than a political debate, it is much better to mix people from different spectrum (not just researchers who research the same field in opposite direction, or else it would be like having a francophone and an anglophone discussing about sovereignty!). Why not invite people like James Gosling, Anders Hejlsberg (from C#), Steve Yegge (from Google), Guido von Rossum (from Python)? Hear about what other languages designers think and why they think the AOP idea is applicable or not. Experts like Bjarne Stroustrup, Anders Hejlsberg remain critical of the idea and they have some very good reasons. Why not hear from them and stimulate a technical but fruitful debate about the future direction of AOP?


Also... can AOP morph out of academia (see Stroustrup in MIT Tech Review) and become a real force? I guess AOP can really learn from Ajax, in that the idea can only be spread if 1. enough people know about it, 2. some start-ups (like Glassbox) apply the technology and become successful, thus become the poster child (much like Paul Graham with Common Lisp), 3. corporate mammoths like Microsoft, Google, Yahoo, start endorsing the ideas. I'm glad that both MS (Research) and Google are sponsoring the research, and Google will be in a much better position to endorse to technology just because of John Lamping, but the AOP community needs to produce students who go to somewhere other than IBM. I look forward to the days when MS Research and Google are submitting papers to AOSD.

Finally, I would say that if AOP really wants to step out of the ivory tower (which it's...), the most effective way is throught the blogsphere. I wasn't aware of the power of the blogsphere until the second day of the conference (after the impromptu open-source birds-of-features session), when I bravely approached Ron Bodkin to politely ask him if he would update his blog. Ron, who is it the founder of Glassbox, asked me if my name was Isaac and told me that he saw my not-so-favorable review on my blog. Of course, I was extremely flattered and surprised since I didn't expect it would get read by anyone except myself. (Note: my point in the previous entry was that the audience didn't comprehend the tool well because they were (me included) mostly students working on languages or VM.) Later I found out that Ron is actually a McGill alumnus :) But besides the McGill connection, what made him, a founder of a Silicon Valley startup, notice a virtually unknown student like me was nothing but the blogsphere (and Google...). I guess there are more people who know the subject much deeper, and write much better than me. The blogsphere is more connected than most people think (even when you have 0 comments). So the conference should encourage people to not only talk about it, but write about it, in the most simplistic if not totally idiotic manner. Although it is unrealistic to expect bloggers such as Robert Scoble, Jon Udell, Niall Kennedy, and Mike Arrington to come (it's a research conference after all, and you don't want it to be treated like CES), if some of us who are most intimate with the technology are able to articulate the AOP idea in a simple sense (remember: simple IS beautiful), they are bound to get noticed and talked about. Only when will the AOP idea tick off into the mainstream, I think...

Remark: well, it took way longer than I thought to finish the whole post and I learned that 1. the Firefox on my lab machine is extremely slow , 2. open office sucks at editing blog posts. So I will only use WL writer to write my post from now on, and I will try to do it only during my spare time (not during Sat afternoon when I'm supposed to work). Also, thank you for those who keep reading... now I know how hard it is to become a tech blogger and I will really think twice before switching from being a developer to a blogger :)




Wednesday, March 14, 2007

AOSD Conference Day 1


The AOSD conference finally starts today! I am currently sitting in the Glassbox framework demo. Glassbox is a AOP framework for monitoring performance and application behavior. It is incorporated with Apache server and allow administrator to diagnose some problem of your web application. You can incorporate it with AspectJ and Spring framework. The downside is the 20%-80% of overhead, because of the heavy user of AspectJ Load-Time weaving, which is unavoidable. Judging from the reaction of the audience (most of which are students), an industrial AOP framework is not very attractive. The next presentation will be about AO (web?) service composition and it will be interesting to see how the framework idea is developed.

I believe we will be seeing more and more AOP frameworks for performance/correctness monitoring and diagnosis. Besides the unavoidable runtime penalty that it incurs, I guess we will be seeing more and more application that take use of the load time weaving facitility for performance monitoring. AOP as an architectual design remains or programming paradigm too elusive: does it really make sense for code your project from the AOP perspective? Does it make it harder/easier to code? Also, crosscutting concerns are often not refactorable (as I stated in my LATE paper)

However, I guess AOP is very useful from the runtime-verification/debugging perspective. I'm looking forward to Rick Chern's paper on the control-flow based debugging in the late afternoon! However, the most significant problem is the dynamic-runtime-weaving penalty incurred.

Well, but backtrack and talk about the keynote given by Gerald Jay Sussmen though. Dr. Sussmen is the creator of Scheme (along with Guy Steele Jr.) and the co-author of SICP. The topic of his talk is Buliding Robust System but it has nothing to do with the program correction/bug-free or even AOP. I would rather argue that he did not talk about AOP at all!

To summarize his talk: the idea of robust system is a system that goes beyond its original objective in its evolution and can be easily extensible with minor changes. (Emacs, anyone?) He used Scheme language and biological system as examples of robust systems. For instance, Scheme only has a very small set of program predicates, is built in such a way that a function does not necessary have a specific objective, but serves as a link between other functions. Operators can also be overriden in different circumstances (like non-commutable matrix multiplications).

The professor used a overhead project for his slides and his slides contained a lot of Scheme examples which most attendees may not be familiar with (not if you haven't read te SICP). That surely generated a lot of yawns... He also made the bold claim that a softward should not have a clear-cut purpose in mind (for it restricts the extensibility) and people surely talked about it. The purpose of his examples, however, is to demonstrate that a robust system (like Scheme/Emacs) should have extensibility and customizability in its architecture. When I heard the talk, I found there were a lot of similiar points made in Steve Yegge's The Pinocchio Problem, minus the analogy to Frogs and Scheme and in terms of readability, is a lot more entertaining.


Due to the incompatibility problem between Windows Live Writer and Blogger I'm not able to post any pictures yet but I will find a way to post them later!

I will continute keep my blog updated for the next few days. Of course I'm scared of talking with famous people like Sussman, Coyler and Kiczales but in the meantime I will keep blogging and taking pictures!


New famous people whom I met: Arie van Deursen and Maja D'Hordt, both of them were invited to the Barbedos workshop but chose to come to AOSD!

Sunday, March 11, 2007

Arriving at AOSD

Finally I arrived at AOSD in Vancouver.

The first thing I realized is the depth of the people who're attending the conference. I'm only one of the few who are still at Msc. level. The rest (of the SVs I've met so far) are PhDs. Also, when I think of it, my paper isn't that difficult (technically speaking) and tomorrow I will be performing in front of a room full of experts who know the stuff way better than I'm. It's one thing to be presenting in front of the Sable/SERG lab, but it is another thing when the room are full of people who really know what you talk about and you cannot BS your way throught. I am never very good at answering questions, and now Martin (and Bart and Eric) are not there to help me out...

Speaking of Martin my supervisor, I just received the poster for AOSD '08 and guess who's in the organizing committee! So for all the students of Martin, AOSD maybe the conference to aim for!

Most of the people went to the brewery to have a good time, but I decided to stay at the room. Bram Adams, a PhD from Belgium, has gone for a drink and if I want to get any substantial last minute work done now is the time.

As a last minute revision, I've decided to keep the hierarchal diagram drawn by FreeMind though, because that is the most effective way to explain the implicit relationship between the class that share the crosscutting concern. Hopefully that wouldn't make the talk too long...

Lastly, an interesting thing that I've seen. Guess who are the corporate sponsors of AOSD this year? There are 3 of them!

Well, if you answer IBM Research you're correct. IBM has invested tons of money and manpower in Eclipse and now in AJDT and the survival and the adoption of AOP is almost vital to its now half-open-source/SaaS business approach.

But the other two are a bit more... weird.

No, not Siemans, although they do have tons of people working on AOSD.

One is Google! I guess the reason is that John Lamping is one of the keynote speakers and Lamping was one of the pioneers in the AOP research. (He co-wrote the first AOP paper with Gregor Kiczales at XEROX...)

But the other one is... Microsoft Research! I really wonder what they are doing down here. Yes, Vancouver is very close to Redmond, MS has tons of money to burn, and they are fighting the talent war with Google and so they have to make a face at anywhere Google shows up. But I don't see any people from Microsoft Research presenting at AOSD '07. Are the MS folks working on a AOP add-on for Visual Studio? Will we witness a A#/AB.NET/Managed AC++ shortly? Anyone???

Enough ranting... let's now really start working on the slides...

Wednesday, March 07, 2007

Introducing "What goes into a great technical presentation?" by Don Box

Don Box, the software architect at Microsoft, talked about how to make great presentation at channel 9. I came across it when I was searching for technical evangelist in wiki. I don't know why Don is listed in the prestigious list of 4 most important software evangelist wiki thinks you should know, but I digged deeper and found this buried video from channel 9. Well... how much I wish I know more about this (instead of youtube/dailymotion).

But I strongly encourage anyone I know who has done or is going to do a technical presentation, to watch this video and see if what he says changes how you plan your powerpoint content.

Best quote: "Powerpoint is at best, at best, a mean..."

Now I'm going to spend less time on my powerpoint for the presentation tomorrow. That means... no more animation!!!

Btw, I will be doing a talk in LATE 07! My first (and hopefully not last) real technical presentation! Let's hope that I won't get grilled...

Thursday, March 01, 2007

Doing charity using your IM

I don't know how many are still reading my blog, but today you can doing charity with no cost if you are a Windows Messenger owner!

Check the link for details!