Slayer's Guide to Computer-related colleges in China

Disclaimer:

The article below is the review of my 4-years studying in the Software Engineering College of Tongji University. It contains my complaints and satires that may lead to discomfort.

Anyway it may not match experiences of others, so be wise when reading it.

The title "Slayer's guide to *Something*" comes from the book series of D&D rules (aka 轰杀指南系列).

On 13th June I received the degree of Bachelor from the college, an impressive ceremony was held and my tassel was moved to the left side. Everything I experienced looked great and people asked me about them. Well what could I tell? I'm not you. All choices you made depend on who you are and what you believe.

Since many people believe that courses are great and the professors are professional, I think my two cents here could be helpful.

In short, my conclusion is that College may be a good place to make you hot in the job market, but it's totally a disaster to the ambitious ones. As if the endless zombies flush into your garden aiming at destroying your flowers of dreams. Whatever, if you're still interested, read on and find out why I think so.

Out-of-date Content of Courses

Here I won't tell you the story of the dumbest ever C Programming Book written by 谭浩强, which is used in every Chinese University. The most stupid part is that if you follow courses all along the bachelor years, you will have never be heard of tools widely used in both Academics and Industries. Don't be puzzled, here I refer to Python, Ruby, Functional Programming, Garbage Collection, Just-In-Time Compilation, Machine Learning, Lambda Functions / Closures, Map-Reduce, ...(Infinite list that you could never enumerate them all).

Don't tell me that these are unnecessary, "with C++ you can do all these stuff". If Universities don't do the job, introducing these coolest technologies, who should do this? It's evil that a College is far behind the times in Computer Areas.

Whatever, to survive from this, you have to READ A LOT. Never believe those words of telling you "With these you'll be a good engineer/scientist". In Computer Industries, there is no ENOUGH. Whenever you stop learning, you died.

FYI:

Non-professional Professors

Yes I know there are distinguished professors in THU and PKU. But unfortunately, as a university of 985 and 211, TJU doesn't have one.

True we have a dean owns the title of Academician, the highest honor in China. But I have never seen him in the campus (Not to mention his hollow research fields). It is common sense in China that a College hires such a person to build its reputation. But for us students this is totally meaningless.

For young professors, though some of them may have an eager to teach students or develop more in academic works, they could never dedicate to them. Stupid Professor Evaluation System in China stops them from doing stuff that make sense and forces them writing more and more nonsense papers to meet the requirements.

Some of the professors are even ridiculous. Let me tell you a fun story.

If you know me, you should know Compilers and Programming Languages attract me the most. In no doubt I'll raise my hand when Professor's words is ambiguous in Compiler Principle classes. Do you know what happened? He simply ignored the question and started checking my attendance records (I presented EVERY TIME). That's what you get because of your thirst for knowledge from a Professor.

It's not the end, just after I gave up and sat down. A girl (while she is pretty I think) stood up and asked the same question. Miracle happened, he explained that with his best efforts and showed us a detailed example.

OK, this might just be a single case, but for most courses, if you were a pretty girl or you left strong impression to Professors, your grade will goes up quite a lot, no matter how strong you're in those courses.

How do I deal with this? For me, quite few knowledge are acquired from those professors. The only good thing is that some of them give me the maximum freedom in their courses to develop my personal interesting. What if you want to ask them problems on Monad? Oh dear, you'd better Google it first.

The Lack of Dreams

I agree that as an Industry-Oriented major the College should teach every student the importance of the financial benefits. But WTF they did? When I talked with schoolmates in my first year. They're excited about Computer Industries and have their dream of becoming next Steve Jobs or creating the best ever PC Games. While years later, THEY ALL BECOME THE SLAVE OF MONEYS.

One junior student came to talk with me. While it's disappointing that what he wanted to know from me is ALL ABOUT MONEY. How much you earn from Google? Do people with master degree earn more? Will oversea returnees earn more? Oh please!

I don't know the reason of all these crazy stuff, and I agree it's good to be wealthy. But that should not be an individual's ultimate goal!

As an engineer I enjoy quite a lot when creating stuff, watching them move, sharing them with my friends. Money is only a by-product to me. You could not agree with me because you're different. But you cannot deny that LIVING FOR MONEY IS AS BORING AS HELL!

Posted on 24 Jun 2012

A Codewalk for Arc3's first-class(runtime) macros

Arc is a lisp dialect created by Paul Graham. It's a tiny lisp implementation built on the top of Racket.

First-class macros is one of the coolest designs in Arc. Generally to say macros in Arc can be bound to variables, passed as arguments and returned from functions. It expands and evaluates the syntax in the runtime. Below is a snippet that implements and primitive with if syntax with Arc's macro system.

In Arc, a macro is simply a tagged vector with its function, its structure can be expressed by #(tagged mac <function #name>). When compiling a source file, for each list that might be a function call or a macro call, it invokes the following function:

Here it detects whether a symbol indicates a macro with ac-macro?. ac-macro? returns the macro function if the symbol do exist in the environment and tagged with mac. After that, it invokes the macro function and compiles its output.

This is quite straight forward, but how does Arc define the macro? See following example:

Here assign is a similar primitive to set! but will create global binding if the identifier doesn't exist in the current scope. As you see the macro declaration is just a global binding whose value is a tagged list. So the problem is, how does Arc make use of a runtime created object in the compile-time?

Yes, Arc treats itself as an interpreter, evaluating every form exactly after it got compiled, which means that the runtime and compile-time environments are combined into one. This is apparently different from other scheme's implementation.

Arc's macro system is quite simple, but it also has drawbacks, e.g. A nested macro declaration doesn't affect the inner forms:

Rather than return nil, it generates following error:

Error: "Function call on inappropriate object #(tagged mac #<procedure: identity>) (nil)"

The reason is that in the compiling process, (identity dummy) is not handled as an macro call since the symbol identity has not been registered in the runtime. Besides this, unhygienic macros may lead to difficult-to-detect problems. So be wise when using them :).

You might also be interested in:

Posted on 28 May 2012