Pages

Friday, May 22, 2015

NUS Module Review: Year 2 Semester 2

Hi everyone! Sorry for not updating this blog more often (in fact it feels like it is never updated at all). Anyway, I finally gathered enough will to post a module review of modules I have taken in NUS. For clarity and organization purpose, I will divide the posts per semester. So here goes the last semester's module review!

CS2102 Database Systems
Lecturer: Stephane Bressan and Zhao Jin

This module is not very interesting, but it is quite useful. You will learn how to CREATE, ALTER, DROP tables, SELECT, UPDATE, and DELETE entries, and some simple joins through the WHERE clause (equality of columns). You will also learn a bit about tuple and relational calculus, relational algebra, functional dependencies, and normalizations. The topics I wrote above is not covered in depth to be useful in the real world, but I guess it gives you quite a good overview of what to expect in higher level database modules.

I mentioned that the module is useful because you get to develop a simple web application as the term project. The project's default configuration is to use vanilla PHP, but the lecturers give us freedom to choose other web framework. Of course, we have to write the SQL queries by hand (instead of relying on ORM like what most web frameworks offer). I used Django (as a friend of mine in the group is highly proficient in it), overriding all ORM methods to write our own queries, but we use Django admin for managing the database (which is the most difficult part if you use the default project configuration, I believe).  Luckily the grader did not say a word about it (or maybe he was not aware that we used it). Thanks to this project, I am not too clueless in my current internship, which is on web development.

CS2105 Introduction to Computer Networks

Lecturer: Zhou Lifeng

This module turned out to be very interesting (in my opinion, at least). We were taught the 5 layers of computer network protocol (Application, Transport, Network, Link, Physical, omitting Session and Presentation layers for some reason). There were 3 term assignments. The first one was to create a simple data transfer protocol on top of a reliable network. The second one was the most important one: to create a reliable data transfer protocol on top of an unreliable network. The last one was just to code out a simple encrypted network protocol using public key encryption.

I was really fascinated by how intricate and yet highly reliable the network protocols are, being built on top such unreliable channels. I am interested to take higher level modules in computer networks, but my friend (who knows better, supposedly) advised me not to. Have not decided whether to heed his advice or not.


CS2107 Introduction to Information Security
Lecturer: Chang Ee Chien

This module is usually taught by Hugh Anderson, but for some reason another lecturer takes over for last semester. He is not very good at teaching, though I can tell that he knows his stuff. The midterm was super easy, as opposed to the finals which require you to understand the things taught in lecture, and think critically what was possibly being compromised, . 

The "difficult" finals was to my relief, because I was so disappointed in the module for the whole semester as it felt so GEM-ish (general knowledge, not so into the CS aspect). To my pleasant surprise, the finals require me to apply what I know and give some creative answers (to some extent, because ultimately there will be a "correct" answer so that he can mark our paper objectively).

There will be an open-ended presentation at the second half of the semester. There will be topics provided, but you are free to propose your own. I took one of the given topic on TOR network. I'm glad I took it because I would not have learned about TOR if I did not. (I am lazy to learn new things if there is no benefit in the short run, unfortunately)


CS3241 Computer Graphics
Leturer: Alan Cheng Ho Lun

This module has been taught by him since forever, apparently. As the lecture notes, tutorials, and lab assignments are the same for the past few semesters. Regardless, this module is really good for various types of people: whether you are really interested into taking Visual Computing or Interactive Media focus area, just want to look around, or want to understand what those graphics settings in your games actually mean. I fall on the second and third category. The module goes for breadth instead of depth, which is why I said it is suitable for a wide range of people.


CS3243 Introduction to Artificial Intelligence
Lecturer: Low Kian Hsiang Bryan

I hoped this module to be more interesting, but as it turned out, it was not really. It is highly algorithmic on the first half and very logic- and statistics-based on the second half. The first half we were taught many graph-search algorithms (which is how most problems are modeled for AIs to solve in the past, like the Enigma machine problem and most turn-based games like chess) eg Minimax, Constraint Satisfaction Problem, and A-Star search. Second half would be about logical agents, and last topic is on supervised learning. Despite the syllabus arranged in that way, the term project was on Machine Learning (creating an AI for tetris), so you need to learn supervised learning in advance (before it is covered proper in lecture) anyway, which I find quite stupid.

The midterms and finals are all about tracing the algorithms instead of solving problems. Although I would not like it on normal circumstances, the fact that I overloaded that semester (I took 25 MCs) means I did not need to study too hard for this module to get a decent grade (I hope, the grade has not been released yet).

LAC3202 Chinese 4
Lecturer: Doris Chen Poju (Chen Boru? I dunno...)

Nothing much to say. If you are going to take this module, most probably you have taken the other lower level Chinese modules. They are basically the same, except you need to write longer essays as compared to Chinese 3.

For the benefit of those who never take Chinese before (perhaps because you took the placement test and got Chinese 4 straight away), you are basically following the textbook (新实用汉语课本2, 第二十到二十六课). Learn vocabs (if you don't know it already), practice the conversations in the textbook, learn sentence patterns (or as they call it, grammar, though I feel that Chinese does not have a grammar the way English does). Exams are similar to workbook questions, except they are a bit harder. There will be 2 口语 at the end of the semester, one is in the form of presentation about Chinese culture, and the other is conversational 口语.


CS3211 Parallel and Concurrent Programming (dropped with W grade)
Lecturer: Hugh Anderson

I took this module with expectation to be taught how to write codes that can run on different threads properly. As it turned out, it was more theoretical than I hoped. Also, the burden of taking 29 MCs has gotten into me so I decided to drop this module in week 6. The lecturer himself is pretty good (I mean, this is Hugh, come on!), but it's just that the course is too theoretical to my liking. But I guess I should have practised myself instead. Considering taking it again next year (only offered in sem 2 =/)

So that's all. Sorry if it got shorter as it progresses as I got exhausted after a while writing it haha. Maybe I will edit it in the future if I have the time and willingness (unlikely, so don't count on it, unless there is a demand for it).

Hopefully the next post will be more useful for my portfolio, or at least for my own knowledge.

Monday, August 18, 2014

Idea 2: (NUS) Lost and Found!

This is an idea that I have just came up with yesterday. I was in the PC commons waiting for my friend to print some stuff, when I helped myself to a vacant PC there and found a(nother) thumb drive being left behind, still stuck into the machine. Any other day, I would have just ignored it as it actually commonly happens, but for some reason, on that day, I thought of an idea for a small Android app for lost and found!

The basic idea is that if we found something, we can take a picture of it and post it into the stream, where people who lost something can try their luck and find their lost stuff there. People can send a request to the founder to claim the stuff, and the founder should ask a question pertaining to the item to verify if the requester is really the owner of the item found.

I know this leaves so many loopholes (people can claim things that are not rightfully theirs) but what I need to do now is not a flawless app; just an idea of an app that I can work out. I do not know if this idea going to remain as what it is; an idea, but I have a plan. Now that I am already back in NUS, I just realized that I actually have the best platform to work on my ideas and getting help at the same time; Friday Hacks of NUS Hackers! We shall see if this project (as well as the previous one) can be done within this semester, with the help of Friday Hacks, or even a Hackathon, if my friends are up for it hahaha.

Thursday, May 15, 2014

Idea 1: Transjakarta Route Planner

Sorry for spoiling the mood of readers that are expecting a lesson on programming (if there are any readers at all here), but this post is not going to be that. This will be just an idea that I just came up with, and I think I should take note of it somewhere that the future me will see in the future. So here goes.

As you may have known, I am an Indonesian, and I came from Jakarta. I usually go back to Jakarta every long holiday (those that last for a month or more) and do not spend my time travelling much. This summer, however, I decided to take up a challenge by interning in a university (Universitas Siswa Bangsa Internasional or USBI, if you are an Indonesian and want to know the name). It is really far from my house and my mother does not really allow me to find a place to stay somewhere nearby ("nge-kos", for the Indonesians out there). Of course, I can drive there, but the problem is, I've got no spare car to use as both my parents are using them everyday. (If you think I am rich or something just because my family owned 2 cars, it is actually quite common for the middle class in Indonesia to have 2 cars, but of course not luxury cars. For the record, my cars are a faithful Toyota "Kijang" (since ~2001!) and a Daihatsu Xenia (since ~2006). As you can see, both are not exactly expensive cars, and they are already quite old.) Thus, I need to find out a way to get there by public transport. Since it is impossible to find out the service route for most public transport in Jakarta (believe me, it is impossible), I tried to just use the best one, Transjakarta.

Transjakarta is basically like a normal bus, but with a better and more organized (though still extremely messy) service route. It is supposedly a solution the Jakarta government came up with to mitigate traffic congestion (though all it does is actually to worsen it). Nevertheless, I find that the website is not really informative (see it for yourself). The first thing I would need, of course, a feature that can tell me how to get to one stop to another. It is not available anywhere in the website, as far as I look. (If there actually is such a feature, please tell me!). Second, I want to check what stop is close to a certain place. Such an information is also not available! Even Google Maps let me down! (On their defense, Jakarta's public transport is indeed so chaotic that it is impossible to compile an accurate data to represent all the possible way to use public transport to get around Jakarta).

This idea of mine would be to solve the first problem. I wonder why hasn't it been implemented by anyone at all, since the idea behind it is quite simple. It is basically a graph's shortest path problem. Of course, I am oversimplifying things by ignoring distance between stops, travelling time, traffic, etc etc but hey, it's a start, right? 

Initially, the program can assume that the distance to adjacent station is the same, so to calculate the shortest path, it will simply be the least number of hops (so we can use BFS). If successful, I will try to extend it to include a weight in the graph, which will be the travelling time/distance (I don't know which one would be better, any idea, readers?) Then if I've got the time (and knowledge), it can be merged with traffic information so that the accuracy of the travelling time will be better.

Just an idea. I think I can make the most basic version soon, but not sure about the most advanced one haha. Anyway, if you happen to be an Indonesian, and a programmer at that, and want to implement this too, feel free to do so! No obligation to credit me or something; I am sure I'm not the only one annoyed by this. =D

Edit: Found an app in the Play Store that has that functionality: finding a way to go to one stop to another for TransJakarta. Kommuta Komutta is the name. You can try finding it in the Play Store too. They decided to go for the pre-processed method, so any query by the user will be responded instantaneously, which I think is really good. I just thought their UI can be improved; such as by giving a map with pins on stops instead of a auto-complete text field, or perhaps even better, a combination of both.

Edit2: Komutta not Kommuta! Sorry!

Edit3: Here's the dev's webpage if you are interested to learn more about them. Apparently they are a mobile-based start up company in Indonesia. May want to work with them regarding the first project, but I think I am still too noob for them.

Wednesday, April 2, 2014

Overview For You, Review For Me

Hi readers! This post is going to be a placeholder for an overview of what I am going to cover in this blog (hopefully). Actually the reason I am doing this is because I will be having a test this Friday, and I need to do a review of what I have already learnt so far. Thus, the title.

Algorithms covered:
- Binary Search
- Sorting (Bubble, Insertion, Selection, Merge, Quick, Counting, Radix, Topo)
- Binary Search Tree (Trees)
- Bellman-Ford Algo (Graphs)
- Dijkstra's Algo (Graphs)
- BFS and DFS (Graphs)
- Bloom Filters (Hash table)

Data structures:
- LinkedList
- Trees, especially AVL Tree
- Graphs, both directed and undirected but no multi-graph
- Heap, especially Binary Heap
- Heaps Union Find
- Hash tables - Chaining vs Open Addressing

These are not everything I have learnt, but I omitted some that is quite obvious (like ArrayList, or even a plain Array) or things that is not covered in great detail in class (Red-Black trees or something, Fibonacci Heap, etc)

Sorry I have much lesser time that I thought I would have. Hopefully I can fill this blog during the summer (though I doubt so because I have already some plans in mind for summer, though those are not confirmed yet).

Saturday, March 29, 2014

Intro

Welcome to this blog! My name is Diga. I am an Indonesian who is currently studying Computer Science in NUS (National University of Singapore). I am creating this blog to store the things that I have been learning in the University, as well as personal projects that I have made. Unfortunately, I do not have any personal project yet (sad) so this blog will only contain the things that I learned, for now.

I created this blog because I feel that there are a lot of things that I need to learn to be a good Computer Scientist, and I believe that storing everything in my head is not really the best idea. So, I decided to store it in the form of the blog. Most of you may have heard about the study that recapitulating whatever you have learnt will actually give you better retention rate. So, by writing what I have learnt in this blog, not only I am able to remember things better, but also, I would have an all-in-one reference for things that I have already known, but I might forget in the future. Not only that, you, readers, could also benefit from it!

For your information, I am currently still in my freshman year (going sophomore after the summer) so some of the things may not be entirely accurate, so feel free to correct me whenever you see something is amiss in my explanation.

For readers who happen to stumble upon this blog, read the content, and become interested in learning programming, but find that some of my explanation are unclear, also feel free to ask in the comments section!

However, because of the crazy workload of a top, Asian university such as NUS, I do not have the time to post everything I have learned promptly. (To illustrate, I have already had this idea since a month ago and only now I have the time to actually start) So, please be patient until I have enough things in this blog, if you want to learn programming from scratch.

That is all for now. Note that this introductory post will be updated from time to time, but may not be as frequent as you would like.