Monday, August 27, 2012

Mid-assignment submission

Mid-assignment submission was a few hours' ago, and I am drained. We were panicking during the lecture itself because we were trying to double-check everything and seeing if we had misunderstood anything. (e.g. Does 'icon' in Aspiration 3 refer to favicon or the actual icon?) We ended up badgering Div and Jon Lew a lot. 

My contributions this time round was mainly drawing the schema, and for suggesting to use Mercurial and Code Igniter. I think, to Jin Guan and Shao Hua, using frameworks is too much of an effort, when they can just code everything in raw PHP, but I found it rather useful, especially in database access. I think I'm just too used to the Drupal 7 way of writing SQL queries. But in any case, I think it's good that we learnt a different framework (along with MVC!), especially one that is much lighter as compared to Drupal 7. 

One smart thing that I did was using MySQL Workbench to generate the schema, by connecting to the actual database. All you have to do is to provide your credentials, and tada, the schema is ready for viewing. It even draws out the Foreign Keys correctly. I learnt about this software during CS2102, from Jon Lew, and I think it's really useful, as it can even forward-engineer (i.e. from schema to actual SQL code.) 

It probably took me a longer time to draw the arrow
 than for MySQL Workbench to generate the schema.

Another thing I played with was drawing the favicon! I used a favicon generator to make the favicon.


Although it looks like a lol, it's not really it. Rather than that, it's supposed to look like a person cheering you on with his two arms, and that ties in with our app. I guess I better explain that somewhere in our application itself, since most people I talked to didn't know the relevance of it.

The interesting point about favicon is that the actual colour may not be seen when it is displayed as a small favicon. In the picture above, you can see tons of blue and brown, but once you shrink it down, you can only recognise it as black. It's interesting how our eye can trick us in that sense. Also, you may ask why brown and blue instead of it being grey. In painting, to add dark tones, we sometimes use dark blue and brown instead of just adding black (which is considered too dark), so I guess the same concept occurs here, i.e. using dark blue and brown to lighten and soften the edges. 

Ahh, and that was my foray into doing part of the design for our Facebook app. Back to playing with the database!

Edit: Also, I did something silly. I forgot to set the Mercurial Repository settings to 'Private'. BIG FACEPALM there. Thank goodness Colin reminded us to check.

Second week!

This weekend was working week, as we stayed back in school from Friday to Saturday to work. We also met up on Sunday to work on the report and the application. Unfortunately, I don't think we accomplished much. On the other hand, we managed to have a framework of how the app is going to be like, so we all have a clear idea of what to work on. 

Frankly, I feel that we didn't accomplish much because we were battling with Facebook SDK. Not Facebook API, mind you. We were stupid at some points in time (e.g. forgetting to include the permissions, script to connect to the javascript SDK - Chun Teck reminded us on this), but some problems were just pure bad luck - like how school internet is slow, so we only managed to get the JS SDK to work half the time. The PHP queries also kept timing out because of this. Also, I had followed the instructions for the iframe canvas app by looking at the signed request through the POST function, but it was not viable for our canvas app. I found that it works better if we had found the signed request through the PHP SDK instead, reason being that in our app, we actually have different pages to navigate to, so the POST request will end up being lost. (Jin Guan found this bug) I think at one point in time, I was quite tempted to write a wrapper to access Facebook API.

My job in the project is to manage the database, and after writing wrappers and wrappers to query the code, I'm quite tired of it. But I'm not a HTML/CSS/JS/jQuery/AJAX expert, so I'm leaving those to the rest of my team-mates who are doing very innovative things. I'm impressed by even the smallest thing my groupmates do, like changing the colour of the input field when it is in focus. Such things really do help to improve the UI of the app. Unfortunately, due to the existence of different browsers (we have a Safari user, a Firefox user, and two Google chrome users) and the need to ensure compatibility, we sometimes face a lot of difficulties in ensuring that the same UI is shown. 

Wednesday talks were interesting. I heard the first talk, or at least parts of it (the achieving potential part), during CS3217, but the delivery was different. The second talk I don't really remember much, but mainly because I've heard of Scrum before, so it wasn't as educational to me. On the other hand, I was comparing Scrum with our CS3217 working habits. The checking-with-each-other part (on what we're going to do etc.) is something that me and Yujing do a lot, and I think it's a good habit to have. Unfortunately, it might not be as easy to implement it in other groups, especially people whom I am not very close to. We'll see how the other two projects go then :)

The third talk probably interested me best, as I knew the speaker from CVWO. I concurred with a lot of his experience, probably because I have had similar experience, although I have never worked with Jon Low before. I agree that sometimes when projects don't turn out well, we might end up ignoring what the person says, but it's really important to listen just in case that person says something intelligent as well. 

Saturday talks were well-done also. The presentation talk pointed out something rather obvious to us - it's the message that is more important than whatever interesting slides you have, and I think this is something most people forget. For me, the audience's understanding is very important, and I tend to panic during presentations if I see a blur face in the crowd, so subconsciously, I must admit, whether the audience understands what you are saying really matters in a presentation. 

The next talk was a Photoshop talk, which was less hands-on because Su Yuen talks very fast, but I didn't have Photoshop anyway, so it was okay. She gave a lot of interesting tips on design, and a lot of her demonstrations were something that we all could do, even coders. This is actually quite useful for my team, as all four of us are coders. 

During lunch, Su Yuen also sat down with us and mentioned something rather obvious to us when we mentioned that we had a group of all-coders - "If all four people are coders, you obviously don't do a game", so part of me is happy that we were subconsciously smart enough to not do a game for our first assignment.

The last talk was on Javascript, and I think even though his to-do list is small, it's actually very nicely-coded. The slide-up and slide-down transitions also make the application more dynamic-looking. Also, there are little details like changing the mouse cursor which I didn't really notice, but kudos to Angad for paying attention to all these little details. I realised that a lot of effort can go in to make even the smallest application and to be honest, I feel that I don't have what it takes to do that, mostly because I tend to think of the general design instead.

I haven't mentioned about what my group is doing, but I'm pretty sure that everyone (or at least the tutors and Colin) will know when we submit our mid-assignment submission. Something else that I can mention is the fact that instead of using Git, we are using Mercurial instead. There's not a lot of reason why we're using Mercurial, but it is pretty similar to Git, and as long as it gets the work done, no harm right? I also heard that the GUI for Mercurial is better, but when I was using Git, I didn't use the GUI version so there's no basis for comparison. Anyway, we were added to the CS3216 organisation pretty late, so we didn't know we were supposed to use Git. I think perhaps, the good part about using Git for this assignment is because the Facebook PHP SDK is in Git, so it makes it easier for you to update it (when you add it as a submodule to your Git repository).

Tuesday, August 21, 2012

First week!

It's been a week since show-and-tell (yes, I am slow in updating my blog), and there's a lot that has happened. 

First up, show-and-tell. I really like how vocal some people are during this segment. A lot of amazing feats were shown and it seems like there are quite a few artists/photographers around. I'm also surprised that there were so many harmonica players, as opposed to guitar, and piano players. There were a few mess-ups during show-and-tell (must have been Murphy's Law), but I think the audience could still understand the speaker and his/her passion, so that was alright. I rushed through my own show-and-tell because I was too nervous, but I'm glad some people asked me questions afterwards about it. In any case, my talent isn't really scrapbooking, but more like random stuff I do that is best presented in a scrapbook. Despite having such a wonderful show-and-tell though, I don't really remember a lot of people. I guess there are just too many faces to remember. (Also, no one pole-danced.)

Secondly, our group was formed! I wasn't really sure of the grouping policy, but I really wanted to do my final project with Yujing and Jin Guan, people whom I know already. Thus, I thought that it would have been better for me not to do the Facebook project with them in case I wasn't allowed to do the Final Project with them. In any case, I did ask around after show-and-tell but nobody picked me. :(

Anyone around at that time can testify that the situation was like that, except that it had involved more jumping, hopping and flailing around on my part. I shouted "Pick me!!!" as well.

But hey, I'm happy with my group, just worried that I might not be able to work with them for the final project, since I don't understand the grouping policy. Our fourth member is Shaohua, who seems to be good at coding too! But since the four of us can code, I think we might fall into the danger of being very good at coding but not being good at marketing/designing etc., but let us persevere!

We have also thought about our app that would change the world. For now, it's going to be kept secret, so I can't write much about it. (Wait until next week, people.)

Saturday lectures were interesting because I've never really fiddled with AWS. There was also Git, but for us, we were at the back trying out AWS still. (I think we were having some file permissions problems while trying to transfer files using Filezilla.) I left after lunch although I wasn't really intending to umm, leave after eating free-food. It was mainly because Geekcamp was also happening at the same time, and I really wanted to go for the talks, e.g. the Arduino talk. Also, the lectures in the afternoon were on PHP, MySQL, Javascript and AJAX, and from what I read in the slides, they seem to touch on those topics very lightly. After weighing in the pros and cons, we decided to skip those lectures. 

Lastly, our group has met up recently to discuss about our app and workplan, but we're still trying out the framework that we will be using. Hopefully, we can start coding tomorrow. Also, it seems that we will be coding throughout the weekend, just like what we did in CS3217. (Time to bring in the blankets and hot water bottles into COM1!)

Saturday, August 11, 2012

What I hope to achieve in CS3216

As the holidays draw close to an end, I contemplate about the upcoming semester. I am taking CS3216 this semester, and after hearing horror stories about it from my friends, I am highly excited but worried over it. Half of me thinks: "I have taken CS3217; I should be able to handle it", but the other half thinks: "I certainly can't underestimate it". After all, CS3216 is vastly different from CS3217, with the latter focusing more on programming and coding.

CS3216, on the other hand, focuses more on problem solving, and requires a different skill-set from CS3217. With that in mind, I will list down the things that I hope to learn during CS3216:

Firstly, through the different projects, I hope to fiddle with the API and learn how to use them. Since there will be a Facebook and a Mobile-Cloud HTML5 assignment, needless to say, I will most likely end up learning how to use the Facebook API and how to code in HTML5. In addition to that, the Saturday lectures will also teach me various topics. Out of all the topics, working with the Amazon Web Services will probably interest me the most, as it is the only topic that I have not really encountered.

Secondly, the people that I will be working with will be from different faculties and will have very different skills. In every project, we are expected to work with someone whom we have never worked with before. As such, I hope to learn to work with them, and in the process, gain an exposure to the ways they work. In addition, I also hope to challenge myself by taking different roles in each project, and hopefully, filling in the gaps in each project nicely.

Thirdly, I hope to learn to manage my time well. It is hard to juggle five modules (especially since I may be tutoring as well), and after reading about CS3216, it seems that I have to juggle my assignments within CS3216 well too. With the three projects, the seminar, and the case studies, it seems that if I don't work hard and smart enough, I would not be able to find time to sleep in this semester at all. Hopefully, after surviving CS3217, I would be better equipped to cope with CS3216, although it may mean staying in school every weekend to code.

Fourthly, I hope to learn to write better. There is a blogging component within CS3216, and while I am not aiming for the best-written blog within the module, I still hope to write well enough so that other people can understand my thoughts. To be honest, I was never a particularly good writer, but I would like to take this opportunity to figure out how to write better. (As such, this post is taking quite a long time as I read through it again and again to make sure that it is coherent.)

Lastly (and probably the most important thing), I hope to build useful things. CS3216 gives us the freedom to decide on our projects, and as such, I hope to build things that are useful, no matter how 'small' they are. Actually, I got this idea from Chun Teck, a friend of mine who took CS3216 last year, because I was worrying over the fact that I had not managed to brainstorm any ideas for the projects in this module. He convinced me to look at the current problems I face and make apps to solve them. As such, I don't believe in an app that can solve everything - there are too many problems to solve in this world, and because of this, I hope to build applications that would help solve things that may be big or small, but are still actual problems nonetheless. 

With these five aims in mind, I hope to be able to survive CS3216, and that it will be a fruitful experience for me. 


Also, to everyone in CS3216, please eat more fruits and don't fall sick during the semester! Let's all work hard together!