Tuesday, 28 August 2012

Some thoughts on design

I just wanted to get this out here, even though I just posted one on the course and stuff (just 1 hour ago). Mostly cause I replied to yuling's post. This post isn't directly related to the course, but indirectly. So to anyone who reads it, welcome to my insights :)

I've been doing programming for 11 years. Design for 11 years. Or actually, programming and design for 11 years.

You see, the word programming has a rather broad scope. It can be about writing the HTML for a webpage, fighting with PHP & MySQL, writing embedded code for hardware (ref Colin) etc. It covers a rather broad range of stuff right?

The word design, however immediately conjures up mental images of artists, abstract art pieces, architects with pencils on their ears, building models, and to a certain extent if you let your mind wander, SDE, NAFA, SOTA etc. Websites with graphics that let your jaw drop, the SMRT graffiti, and especially, epic buildings like National Library (I know there are probably better and epic-er ones but humor me please, I like the NLB). Somehow this seems more niche and specialised to me.

However, let me propose a (maybe) new concept. Programming is part of design. It is one small part of design.

----

Stop reading for a while, think about it. Think about what you have learnt these years (if you're a programmer and you don't believe what I just typed). Then continue reading.

----

The idea that programming is part of design has probably been a part of me for some time now. But it just occurred to me consciously, and as I write this post, I think I can stand by this view, and show you a different point of view into something probably hard.

I always held that view all these years that programming is strongly logic-based. After all, how much different can you calculate some numbers? However, this actually applies to the execution. The term "top-down design" by definition, means breaking down a problem into smaller parts to be solved by computer. There's two parts to it, one is the solving part, and one is the breaking down part.

Design comes when us, the human, puts our experience into solving a problem. We decide how to break the problem down, and decide how to structure our solution, before converting the solution into commands for the computer to interpret. By that nature, we are designing the program. After all, it's not purely hard logic like math, where proof by various methods are required before something is accepted. There are many ways that reach the same answer, some more efficient than the others, but nonetheless, a solution.

Engineers would know that we all have this design project in year 4. Same thing here, it simply is a matter of putting our judgement to a problem, to obtain feasible and safe answers to a certain problem. There are many ways too, and none is more correct than any other if all of them meet the specs.

It all boils down to our creativity. Programming is an art, a skill that doesn't follow rigid guidelines but our experience, our creativity. It can be shaped, moulded in the way that we want it to be.

I guess I have to clarify to my IT1005 students about this.

----

Design, when used in my first definition (of artists and architects) is a much more specific definition that people may have, that is more artistic, more graphically-inclined. Programming and engineers attacking their design project are practicing the more generic idea of design, that implies putting creativity and experience to work. Both definitions embody the spirit of human creativity.

In this class, we routinely classify ourselves as a programmer/coder or a designer. This probably limits our potential in crossing into the other field, since we have already boxed ourselves into one specific term. We all can focus on one, but don't limit yourself to just that!

Let's hope there isn't any more explicit emphasis of "programmers vs designers" in this course, and hope everyone will try both sides! (:

(and of course, I lost my original purpose of the post by going rather deep into this topic... the wonders of the shower. good, it'll make for another post when I have the time :D and haha there are very weird statements in this post. I promise I'll try to not edit this post! Promise!)

Week 3: Crazy week

I'm surprised to have passed 2 weeks without actually giving up... although numerous times I've thought of giving up the module and my minor. Looks like I'm slightly more resilient than I thought?

Anyhow, this last week has passed in a flash. We (me, yuling, yujing, shaohua) only properly started coding quite late (shan't say when), and earlier on was mostly thinking of the app and planning features and such. And OH MAN how crazy it was. I've never written code this fast before.

Since all of us were coders, I decided to take on most of the design stuff for our group. So, CSS effects and layouts came under me, and oh my whitespace is an ART. I've never designed websites that I don't feel "urgh" at all, and frankly my design for this assignment is still giving me the chills. It may be because of Fireworks, or maybe not. In any case, I decided that my colour sense was terribly bad (even though I have done so many design things before), that we took 1/2 hour discussing which colour scheme to use, while I was reading on hues, sats and lums.

Also, this assignment gave me my first overnight coding marathon in SOC basement. For 2103 (during last year's special term), my group of 4 non-SOC students (chem eng, EEE, and two ISE) coded 10am-10pm for several days before the deadline. This time round, it was 6pm - 2/3am, then yuling & yujing went to some secret place to sleep. Shaohua went to sleep at the chair in the basement. Can't really remember what time I stopped (should be around 3), but i didn't take much sleep. Slept on 3 chairs pulled from the table behind me from 3-5am, and woke up cause I couldn't bear the aircon blasting away. So woke up, and continued to go through the code.

Saturday's workshops were not really useful for me, since my mind was on running away for my make-up lecture at 11am (they had to close down some LTs to clear up the stuff in E3A on Wednesday). As the clock ticked closer, I just couldn't sit still, and when the time came for my design project lecture, the context switch just couldn't be made. I was trying to fix my code instead of learning HYSIS ): Going back to SOC for the rest of the workshops were like a guilt trip, since I couldn't concentrate on either. Came back to the middle of some jQuery workshop, which quickly ended after I reached... So the workshops weren't very effective this week. (I like the AWS one though, but it felt rather like a speedboat ride O.o).

Anyway, though I knew yuling n yujing from our SEP in HK, this was the first time that we worked together on any project. And haha, it is awkward sometimes. Like there's something you believe strongly in, but you just can't get consensus, so where do you go from then on? It's just that, maybe I'm weird.

The project progress is another big problem right now. It seemed quite ok while in the planning stage, but now we have quite a big gap between now and achieving the basic functionality intended right at the start. Even if we cut some features, eg editing the created stuff, it might not be possible to complete in time. I mean, come on I have to be realistic. BUT yet, to me somewhere it's a challenge, we thought this was possible, and only WE can prove to ourselves that this wasn't wrong. After all, we estimated our ability at this level in the first place. Can we do it? Let's hope none of my group breaks down right now!

Jiayou to all of my group! Everyone, be strong, we can complete this! I know you all have the potential :P

And jiayou to me too (:

Tuesday, 21 August 2012

Week 2

Week 2 is here yet the class isn't. Strange yea.

I don't really think I can say much about the workshops last week, except they were really just in time, for the load of work that we were supposed to start on.
  • AWS + UNIX workshop was awesome, it's the first time I dug so deeply into UNIX, considering that I had *some* exposure in terms of CS1010E. It's rather crazy what we went through in that 1 hr or so, like seriously "I started up a server somewhere else by a click of a button?"

    (of course, on second thought I think it's not a real server starting up, but just one of the many VMs in Amazon's data centres)
  • Didn't really follow the Git workshop, since I was fighting to get Secure Shell Client working with AWS (of course it didn't), and Filezilla too (this did though). But occasional glances told me I understood quite a bit of the material from my CS2103. So yea I'm just lucky I guess.
  • Lunch was awesome, but super paiseh that we basically ran off in the afternoon for GeekCamp. Rather interesting things they talked about, like Arduino (can we do one for the sake of learning it? please? oh wait, I guess better not, enough on our hands already).
  • The rest of the talks, probably didn't miss much on PHP/MySQL (after all Google can tell us a lot too), but missed AJAX :( a pity...
Don't know if I should talk about the progress of our project here (what progress?)... Probably leave that to another post?



In any case, I think like many things in the world, this course puts structure on something that doesn't really "need" structure. And the effect can be drastically different - like me who already knows a little bit of PHP/MySQL would be able to probably do an app on my own. It'll just take a crazy amount of time (like months), cause this is NOT what we are trained to do. And so this little bit of structure is appreciated.

Modern life is such that we are most likely unable to complete every single thing we want to do. For maybe half the people in the class, who aren't programmers "by profession", it is hard to sit down for days and fiddle with some foreign servers (what do you mean by "instance"?), out of your own free time and pocket money (or even start to for that matter). To me, it does apply to other hobbies as well.

We may yearn to do something big - the next big thing that changes the world - yet often we realise that it's not within the power of one person to do these things. We do not sit down and think through most valuable ideas, expanding them one by one, validating whether they are actually feasible or not - this is the "easy way out".

More often than not, there are many road blocks ("brick walls" in the words of Randy Pausch) that we encounter in the thought of these ideas. And so most of the time, we ignore and move on, although I agree that "brick walls are there to show you how much you want something".

As an engineer, we build and design stuff based on optimizing our scarce resources while getting the most benefit out of it (usually economic in nature). Programming too - we optimize and develop algorithms to improve on our "space-time".

The average human lifespan is probably now 70-80 years. If you consider time as a scarce resource, it is of course impossible to explore everything that we want to do - like DFS of an infinite branching tree. Time is limited for every one of us, so how do we decide what "great ideas" should we investigate, in order to bring the best benefit out of all these ideas?

Thursday, 16 August 2012

First week of school~

(This isn't a CS3216 post but yea...)

The first week back in NUS in a "normal" semester has been a rather crazy week.

With 1 semester away in HKUST and 1 semester at ExxonMobil with just night classes (they don't count as school), studying is just "a little bit" foreign to me now.

The landscape around me is changing so drastically. So far this week, I've gone through CS3216, CN3121 process dynamics, CN4121 design project lectures, and FYP meeting. Module types aren't just MUG and OWN. Must do lots of projects liao.

Also met dear Haoran who's leaving this Sunday for Cornell for PhD. One less close friend around in SG.

Time to start noting down what's happened this past week.
 
FYP
I really think my FYP for now is lagging behind quite a bit. Supposed to be studying COMSOL and analysing all the PDEs, but just cannot understand it. Studying COMSOL boundary conditions now. Let's see:
  • Mass continuity
  • Momentum conservation
  • Species conservation - i.e diffusion
  • Charge conservation
  • Energy conservation
Looking forward to the time when I can start my Matlab GA optimization :) the PEMFC model will then become a black box :D

CN3121 Process Dynamics and Control
Concept of this module is SO similar to homeostasis. Yet yet yet, it's so mathematical. Open-loop/closed-loop in first lecture is so complicated.

Feedback: Controller reads from controlled variable, calculates error from set-point, uses transfer function to eliminate the disturbance by adjusting manipulated variable.
Feedforward: Controller reads disturbance variable, directly adjusts manipulated variable based on theoretical mathematical model. No visibility on controlled variable.
Cascade: Combination of feedforward and feedback mechanisms.

CN3135 Process Safety
Haven't had class yet! Heard it's not going to be very exciting ><

CN4121 Design Project
Lecture was rather boring. Looking forward to starting Hysis!

And really, after internship, you lose much interest in theory. After all, in industry theory isn't used much. You JUST can't do mass balances or process control by hand anymore. Most decisions are based on heuristics and first-hand experience of the unit or process in question, or huge amounts of software. Theory is just used as a guiding factor, and so hidden from engineers, such that the talk around is "when you graduate, the DCS does everything, you just need to type in the value to the system. you won't need any of these at all. Just press buttons!"

Hmm that is rather shortsighted. I still want to go Aspen or Honeywell if EM doesn't want me back...

Tuesday, 14 August 2012

First Lecture

After this first lecture, I'm still wondering if I should be in this course at all. Many thoughts...

Panic mode engage.
  1. Not that the course direction isn't what I want, but whether I will die AND kill my FYP and my honours in one go (if no A-, bye bye to 1st class)... I don't know if I can manage my time well enough, considering that I am a rather slow worker in programming (faster than many Chem Engineers, but probably slow compared to all of the other students from SOC). It's just, whether I can have enough time to still have some semblance of a normal life. (Ref: http://www.fastcompany.com/node/28121/print from NUSHackers group)

    Groupmates, whoever you may be, please help me out! I can do frontend stuff like HTML, CSS, simple images and "flashy" little stuff, but for PHP and SQL, I think I may really mess up those.
  2. Just my thought from the first lecture. I came into this class with a hope that we would be empowered to do some useful stuff for the sake of many people out there who we would never know their names or faces. This small hope is mostly smothered with facts of practicality, and it's hard keeping it alive. There is no need for every single person who takes the stage to emphasize "you are going to die! muahahaha" and further make us question whether we should be here. No matter what, I'd really rather hear encouraging words. Negatives drown people. After all, it is not very useful to dampen the spirits of people who wish to change the world. Every effort to do so may not be world-changing, but it matters to those whose lives we've touched. I'd hope the environment in future is encouraging and not negative.

    (really recommend that link up there to all who believes that coding through the night is the only way to produce great results, if not you're not putting in enough effort.)
  3. Of course, it's weird being in an environment where you usually don't belong in. Even after taking 3 modules from SOC and being IT1005 TA, being physically in SOC itself freaks me out still. I have no idea why, it may be some sort of aura. It always feels like, "I don't belong here". There's always a very strange and lonely feeling when I'm in here. It's like, eventually "I'll leave this place and go back to my department"
  4. Need to be less introverted and try to interact with more people. But talking to any people (asking for directions, small talk, heck even just filling out the form yesterday) drains my battery like mad. Anyone has any good ideas?
  5. Ambition may be good, but I believe I need to take measured steps. Is this a measured step? No. (seriously)
  6. But of course, I still believe in the spirit of CS3216... Just heavily doubting my ability to survive the execution of the module.
Yesterday after reaching back to my room in KFH, one of my friends came over. We were talking about the first day of school, and the topic inevitably reached CS3216. Of course, the heavy workload came up, and his recommendation was for me to drop this module and focus on the FYP.

Not. After 3 years of waiting, this is my chance to do the module. But I think I need to depend greatly on all the other coders, since I consider myself rather deficient. Let's see where this all goes to...

Now what's needed is to switch from panic mode to excited mode. Then all will be fine. How to do so?

It does feel better getting some of this out of my head.

Sunday, 12 August 2012

Show-n-tell stuff!

Thought it'll be fun to post some snapshots of the stuff I'm bringing to show-n-tell... Something that's not very complicated, and very easily made by anyone else.

Not saying what it is (yet)! :D though yuling and yujing know, and it really is just very, very simple...


Friday, 3 August 2012

CS3216: The beginning

So I've signed up for CS3216 in my final year in NUS. It’s a strange feeling, considering that I had wanted to take this module back in my year 1, but of course I was nowhere competent enough. Even after 3 years in NUS with several CS modules (actually just 3) under my belt, I still feel rather unprepared and uncompetent to really survive this module. The warnings in the emails didn’t help much either :(

Back in year 1, one of my friends showed me “The Last Lecture”, and linked me to a website on CS3216 (it must have been the blog by Prof Ben). I was immediately enthralled, and right away I wanted to take it. In the years in between, I picked up C, C++, C#, along the way of my CS minor. I figured out that self-taught programming served me well for foundational CS modules like CS1010E, CS1020E etc. Yet CS2103 Software Engineering seemed rather tough, since the assignments weren’t simple puzzles anymore, nor doable in an hour or two. This was when I started to doubt my ability to do “real-world” programming.

Nevertheless, along the way my temp jobs (Access + SQL in one, Excel + VBA in another) gave me more opportunity to experience the client-developer relationship. My internship at EM was Chem Eng-based, yet involved interfacing with lots of specialized software. Exposure to all these specialized programs gave me some idea of what a well-developed program was supposed to be.

Indeed, I still consider myself rather unprepared for whatever this module would give me (or maybe even throw at me without being anywhere ready to catch it). Preparing for show-and-tell is already quite a challenge, having gone through several options, finding all of them infeasible :(

So let’s imagine, in a world where I am more resilient, here’s what I hope I can learn from this module:
  • How to program on new and interesting platforms (the web is so big, where do we start from?) – how to write code for all the cloud computing platforms like AWS, Azure, Google Appspot (I think this is outdated)
  • Also, concepts/techniques for harnessing this power out there. These services are so powerful, how do you use them apart from being just a simple web server? I guess there has to be some element of distributed computing here.
  • APIs of Facebook and how to utilize them. I don’t want to get scolded by my users for doing things that fly in the face of usability, security (especially) and really, really *common sense*. What do we need and what do we not need? How do you use this info that you get? To cache or not to cache (does this infringe on the “we won’t keep any info” clause?)
  • Legal stuff (as above), since we are now using info from users. Might be interesting to know what is acceptable (at least won’t trigger a legal response from MIBs in suits).
  • Programming concepts and patterns (further on from what I learnt in 2103), with particular emphasis on web-based concepts. Things like threading and rendezvous of independent objects don’t make sense to me in a web-based environment, no matter how I twist my mind around it.
  • How to be more flexible, because the world isn’t going to stay still and adapt to you. The ground beneath you is going to change so quickly. It’s going to be true in engineering; more true in the field of CS. The difference is just that engineering is limited by the discovery of physical reality, but CS is limited by human imagination... (which is much, much faster than discoveries).
  • How to manage time. Of course, I don’t want to fail all my other modules and FYP!
  • And, really, how to be more resilient. Basically, be able to look at this list at the end of the semester, smile and think to myself, “I did all of these and survived very well”.
Of course, I just hope that the world where I am more resilient == this world. So this sums up my expectations of this course, of the contents and of the intangibles. Let’s hope it will all turn out well! :)