Wednesday, 30 December 2015

Issue: Re-size image to a square based on width on any viewport

I've been surfing the net for a few hours to find a solution for the issue above. None such! I crawl back to my favourite "hard-coding" media query. I exhausted every device on Chrome's device mode (responsive design mode) and these are the outcomes:

I specifically picked these rows of pictures because the other pictures were a bit cut-off because some committee members gave pictures of challenging dimensions.

Labels: , ,

0 comments | Leave a comment

Everything becomes way more complicated when it is not about a personal blog. I hope I could be of some help. My to-do for the other website tomorrow is to ensure the height of the pictures in the "About" page are re-sized according to the width to become squares on no matter what platform the website is viewed on. I was told to start on JavaScript. I find it daunting to transition to JavaScript when it is not the syntax or algorithmic thinking.

Labels: ,

0 comments | Leave a comment

Tuesday, 29 December 2015

Although I watch around half to one lecture every few days (used to be everyday), I feel like I am losing touch with the programming I did last semester. What I mostly do in the vacation does not involve as many "critical thinking" type of algorithms.

Because the back-end of the website is incomplete, I am adding data to the database manually. I am too tired to check rigorously if the data is copied over correctly (from a .sql file to a .rb file). I managed to google for a solution to "div" every fixed number of elements. It was such a simple solution, I think I would have been able to see it if it was not in the context of a website because the solution was a nested loop.

Labels: , ,

0 comments | Leave a comment

Sunday, 27 December 2015

A Crash Course (2 hours) -

Labels: , ,

0 comments | Leave a comment

Thursday, 24 December 2015

I was told to "go create a Facebook API code". My mind drew a blank. Or am I supposed to be clear of what to do? API = application program interface, and the only thing I know about API is that it made life easier for me when I wanted to access specific reports on Cuckoo, by appending some parameters into the address bar. What code? ...why am I so lost? I'm starting to doubt myself, like why I am so slow.

I missed another meeting yesterday because I did not know until the day before that there was a meeting and I could not change my plans. I think the shifting of the meeting date was announced in last week's meeting which I missed due to work. Sigh... am I slowing down my team... even though I was working overtime and at home too on Tuesday.

Labels: , ,

0 comments | Leave a comment

Wednesday, 23 December 2015

I was totally lost trying to set up this light-box for the About page in the faculty club's website. In the end I resorted to copying what was on the Events page. There were a lot of reused names and I got really confused even in copying. I wonder if I have learnt as much as I am supposed to. I am clearly the weakest in my team... am I really of use? Anyway, I really want to write a website with clearer abstraction, but it's also difficult to try to think of different ways to refer to something, and remembering where they belong.

Labels: , , , ,

0 comments | Leave a comment

Sunday, 20 December 2015

Due to my lack of familiarity with VirtualBox, I had to "reinstall" openSUSE on one of the virtual machines in my second computer. I hope to be familiar enough with both VirtualBox and openSUSE so that I can actually do some homework inside. I don't think I want to be familiar with an old OS like Windows Vista.

I chose openSUSE because

1. ArchLinux was too intimidating
2. Linux Mint does not load
3. I already had a taste of Ubuntu
4. I already had a taste of Fedora, although I barely use it

And I chose the KDE Desktop because it is different from the GNOME one on Ubuntu. As of now, I still like GNOME more. One click = execute just does not seem right to me, and there are other differences to be discovered... just reading online does not do enough justice to this OS/Desktop.

Labels: , ,

0 comments | Leave a comment

Saturday, 19 December 2015

Time to set up the old computer given to me from my dad. I don't think I'll venture into this OS again so soon. It was a shock to me, being welcomed to the terminal instead of a desktop. And I could barely understand anything from the ArchWiki guide.

Labels: ,

0 comments | Leave a comment

Friday, 18 December 2015

I pulled a few days ago and I am going to have to pull again because I missed yesterday's meeting. Hopefully I can catch up with the meeting next Tuesday!

One of my bosses from First Code Academy shared with us some ice-cream. And a parent of a boy from my morning class gave me and my colleague some chocolates as a thank-you gift. She seemed supportive of the class and that came a long way in cheering me up.

Labels: , ,

0 comments | Leave a comment

Wednesday, 16 December 2015

I am working with First Code Academy as an Assistant Instructor for this week. I have two Tinker Camp classes every weekday. The subject of the classes I am in charge of is a block-based programming language called "Scratch", and my students are between 8 to 10 years old.

The children are lovable (I think most of them like me too), and I say so even though I thought I am uncomfortable with children. There are some who are mostly attentive and are interested in furthering the projects that we introduce in class. There are some who become distracted for a part of the lesson because they were either too much faster than their peers, solely seeks completion and not pushing to perfection, or were extremely prone to giving up at the slightest lack of clarity.

I am not the lead instructor, but I do want to at least share some reflections with you readers who must either be my friends, family, or people just as interested in tech as me.

It is not easy to ensure even 6 children are learning to their fullest. I was running around throughout the class to answer my students' questions. Some of them ask about advanced topics, such as adding new features to their applications. Some of them ask about a specific customisation to the features that we introduced. Some of them ask practical but important questions like dealing with scripts or sprites that were misplaced.

There were also children asking me about almost everything about the programming. I understand that programming does not come that easily especially if you are not even in upper primary/secondary level and do not have the backing of their math to aid in more complicated logical thinking that is required in creating games.

And the questions often come simultaneously. I would be able to deal with all of their questions almost immediately if I programmed for them, but is that the aim of our camp? So I made it a point to stop and try to question them back with prompts about concepts that were taught in the previous lessons. These prompts work for most of the time, but they consume more time.

I usually only manage to answer one question per student whenever I was asked a barrage of questions (some asked one after another but I had to postpone the answers). I had to try hard to motivate them to work on their own, also as a measure to buy enough time for me to answer another child's question.

About the children being distracted, I should recommend force-screen-sharing to my organisation. Some children could not close their laptop lids because the laptop would be switched off and I think it is overly intrusive to change their computer configurations especially if they are not exactly clear about how we do it on their computer. And because of this, the more mischievous children will exploit this loophole by refusing to close their laptop lids and even playing on their computers during teaching time. There was also a girl who brought her phone; she used the Wi-Fi to her advantage and soon became distracted with her phone games. I guess it was a bad move to reveal the Wi-Fi password.

I failed to challenge the more capable and faster students mostly because I prioritised the catching-up of the other students. There really is a limit to what one person can do. I did not have any break despite the lesson having 5 to 10 minutes' break during parts of the class. And there were still unanswered questions. A student came early this morning and asked me a question which he asked me yesterday but did not get an answer for. Thankfully, because there were still 20 minutes to class, I could answer him.

Although unlike my older colleagues, I did not have to complete any post-lesson duties, I still felt like I really put in my all for my students. Because I tried to teach them through their haziness about programming during those two hours everyday, the two hours which make the difference to their learning.

It has been a enriching and fulfilling experience, I hope that what my students bring back from the classes with me will be valuable in easing their lives. It need not be about computer science; it is more about the way of thinking, and that is the most difficult to inculcate and nurture.

Labels: , ,

0 comments | Leave a comment

Monday, 14 December 2015


Labels: , ,

0 comments | Leave a comment

Sunday, 13 December 2015

Git Flow Chart (insert image)

Write to the files in the repository and updating the remote repository locally:

  1. Open the repository in explorer ("cd <repository>").
  2. Create changes in the repository (I created a new file) ("touch <file>").
  3. (In the middle column) The check box on the left of the changed file indicates whether a file is included in the next commit ("git add <file>").
  4. Write a commit message and click "Commit to master" ("git commit -m 'commit message'").
  5. "Sync" the local and remote repositories ("git push <remote> <branch>").

To be continued

Labels: , , ,

0 comments | Leave a comment

A Crash Course on Windows Command Prompt and Git (2 hours)

(before the workshop)
You are highly encouraged to have a Mac or Windows machine with the following:

  1. Personal GitHub Account
  2. GitHub Desktop Application
  3. SourceTree Application (I quit)

Setting up a repository (first 15 minutes of the workshop)
Instructions for GitHub (Website):

  1. Create a new repository or fork the repository from me. Reference below.

Instructions for GitHub Desktop (Application):

  1. Click the "Settings" icon on the top-right corner. Go to "Options".
  2. Add your account and configure Git with your name and e-mail (configuration details may be the same as those of your account).
  3. Click the "+" icon on the top-left corner. Go to "Clone" and click the repository you created or forked. Check "Clone (your repository)". Reference below.

Now we are ready to operate on our repositories through these applications.

Labels: , , ,

0 comments | Leave a comment

Command Prompt:
  1. Directory
    • Print working directory (echo %cd%)
    • Change directory (cd)
    • List directory (dir)
    • Make directory (mkdir)
    • Remove directory (rmdir)
  2. File
    • Run (start <file>)
    • Create file (type nul > <file>)
    • View (more)
    • Write to file (echo)
    • Copy file(s) (copy)
    • Move file(s) (move)
    • Remove file(s) (del)
    • Wild Card (*)
  3. Others
    • Disk Part (diskpart)
    • Host Name (hostname)
    • IP Configuration (ipconfig)
    • Copy (left-click, drag across, then Enter) and paste (right-click)
    • Scripting (.cmd file)
C:\Users\Jiayee > D:
D:\ > C:
C:\Users\Jiayee >

C:\Users\Jiayee > echo A
C:\Users\Jiayee > echo "A"
C:\Users\Jiayee > echo A > myFile.txt
C:\Users\Jiayee > echo A >> myFile.txt
C:\Users\Jiayee > echo A > myFile.txt

C:\Users\Jiayee > move
C:\Users\Jiayee > move

C:\Users\Jiayee > python < input.txt
C:\Users\Jiayee > python < input.txt > output_2.txt

C:\Users\Jiayee > python < input.txt | more

The directory is not empty.

  1. Create a new remote repository online, fork from existing repositories.
  2. Set up the aforementioned repository locally (clone, pull).
  3. Create changes in the local repository (write).
  4. Save or undo changes in the local repository (add, commit).
  5. Update the remote repository with the local repository (push).
  6. Refer to "Syllabus"

Labels: , , ,

0 comments | Leave a comment

I think the React tutorial is less brain-consuming than Rails', but that's because I am not familiar with the syntax of Ruby's classes and objects, plus Rails' unique API, I would be really confused about who's who. Also, React is mainly about the View, which I am more familiar with. Phew.

That doesn't mean React is easy though, I am following the tutorial for now. But I guess it's another level higher to write from scratch. hacknroll allows reuse of code though, although a 100% recycle is not cool.

By the way, I am not using the JSX syntax because that is new and too many new things will throw me off. I am comfortable with the HTML tags although they belong to React.

This is crazy (extremely persevering as programmed) and I'm going to Ctrl + C this.

Labels: , , ,

0 comments | Leave a comment

I was wondering what to do for next year's hackathon "hacknroll" in end-January. I don't think I want to build a website from scratch because

1. I am only familiar with the View for pure HTML/CSS + a few other frameworks
2. I am still lost in Ruby on Rails and that will either slow down or stop me from hacking all day.
3. I don't think a website is any appealing for a Hackathon project unless it has functions inside... applications.

So I want to build an application. I will not be well-versed in Java because it will be my official 2nd week into Java. Then how about web application? I am okay with JavaScript as a programming language by itself so I think I will spend some part of the remaining vacation bridging my understanding with programming applications. But pure JavaScript does not seem fun enough; I think I will try ReactJS since my senior from NUS Hackers taught for a ReactJS workshop in hackerschool and I should put that to good practice. I already put what I learnt from HTML/CSS into practice with this web page. As for pure JavaScript... another day!!!!

I find it really strange that sometimes it snows on my web page and sometimes it doesn't.

I am not sure/forgot how to access my files, so I start with the I.P. address first.

This page looks like the download page for NUS CS1020.

Finally! But I don't know why I end up downloaded the .html~ file when I click it. I don't know what the additional "~" means.

For the start_server shell script, I used "python -m StartHTTPServer" as seen in my senior's workshop material.

Labels: , ,

0 comments | Leave a comment

Yesterday, or more like 2 days ago because it is going to be 1am now, I installed Windows 8.1 into my mother's desktop. For some unknown reason, she could not connect our home's Wi-Fi on Windows 7 but she could do so in the Ubuntu 14.04 I installed for her.

Now this clean install of Windows 8.1 is working fine and pleasantly according to my mother, as she liked how the text looked (I did not go to find out how to customise this kind of view but it should be possible).

However, I dare not recklessly uninstall Ubuntu from her computer like how I do to mine a few times (once was not enough to teach me a lesson) by deleting the partition and thinking (wrongly) that life is back to normal once again.

I am going to work next week, but I hope I will have time to find out how to cleanly uninstall Ubuntu. If you have any sure-win recipe for this, please let me know!! I got this Windows 8.1 operating system from my DreamSpark Premium account which my school gave me. There are other software, but I find it difficult to put them to use when my collaborators use Linux or Mac only.

Labels: ,

0 comments | Leave a comment

Saturday, 12 December 2015

This screen shot was from last week. Just this Thursday, my boss taught me how to pull from other people's repository. The fact that he had to teach me this is a warning that the "me" now is in no position to teach a basic Git workshop. But I will not stay the same. I'm glad my boss is very patient with me. I hope he won't be too disappoint with me unable to insert a light box inside the "About" page. I read the documentations for Magnific Popup but no matter how I tried to insert snippets of their examples (sometimes customising accordingly to my images) into the .html.erb file, Rails will crash. I can't help but think I am not understanding something concerning routing about their light box.

This was my progress during the second meeting. The first half of this meeting was spent on changing the footer. The footer I created initially was very wordy because I copied from the original website. The cat's from placekitten by the way. Very adorable but I'd wish there's a random cat generator. Smells like a project.

The pictures are just a joke. This is a simple usage of the Foundation's grid system. But as my boss had said, there must be borders so that the pictures and words can be grouped together.

Foundation ensures that the start and end columns are aligned. I tried to collapse it but to no avail. I pushed this to the repository and created a pull request. Hopefully somebody could shed some light on this. I spent too much time.

Some concepts in Rails are still hazy to me. It is a whole new world to web development for me: I guess I was doing web design all along.

Labels: , , , , ,

0 comments | Leave a comment

Thursday, 10 December 2015

I finally got serious and spent the entire day writing to this file! I had the grid structure ready (from the HTML5/CSS3 Workshop held by NUS Hackers). My job that whole day (Monday) was to gather images of Inori, choose fonts from Google, colour the columns, and mobile-optimise the page. I'm thankful for these tools (Google search engine and fonts, Photobucket image hosting, W3Schools for tutorials, and Inori fans who uploaded her pictures) and now I'm feeling a bit sheepish for not inserting a Credits corner. Alright, that will be my next push.

This one's for my personal diary blog. A screenshot of the page is attached below. I did not use any Bootstrap here so I find mobile optimisation really difficult. I have not succeeded yet, and I am a bit tired because my Webmaster duties have officially started and I should be focusing on revamping the faculty club's website ( As of now I am constructing the Header and Footer view. I have to go to school tomorrow (or today, since it is already 12.30am) to continue working on them. I think I am a bit slow and I feel guilty for it... I had another meeting today and I had to put the duty aside for the day.

I think I will go to sleep soon. I did not install Ruby on Rails in Windows, but I enjoyed constructing the view for my personal blogs in Windows... Notepad++. Now this brings the question: Am I really appreciating Windows? My school gave computing students a premium DreamSpark account but I have yet to install what I downloaded. I downloaded Windows 8.1, Virtual PC, SQL Server 2016 and a few more.

I think my procrastination in using these products are because I already run a dual-boot and I have their counterparts in that operating system. For SQL, I am not familiar with it but I conduct my operations through phpMyAdmin. For Virtual PC, I have VMWare Player here and I stuffed in Fedora for fun. I barely touch it because it loads really slowly. I was taught that SSD improves performance and speed especially for reading files but I guess it applies to loading VMs too.

I am really comfortable with Windows 7 and I am just resistant to change. There also a lot of other stuff to do and I will thus postpone exploration.

Labels: , , ,

1 comments | Leave a comment

Monday, 7 December 2015

I had been mischievous this year and I accidentally wiped out my recovery partition (the second rectangle from the left). I am not sure how much the Linux Swap should occupy but after extensive surfing of the net, it seemed to point to 2 GB. I hope to learn more about this someday by asking someone, as for serious reading, maybe at least after my Computer Organisation classes. The 93 GB was supposed to be 100 GB and it was thought to be the D-drive. The largest rectangle on its left belongs to my Windows 7, and the one on the rightmost belongs to Ubuntu 14.04.

I remember once messing my partitions so much that I had 7 partitions... If my parents have any old (but not too slow) computers, I would want to try multiple-OS boot for experimental interests... the laptop my dad gave me was not powerful (and I don't feel like removing the Vista OS).

Labels: ,

0 comments | Leave a comment

Sunday, 6 December 2015

This blog's appearance is almost totally done by me, and so it's rough and shoddy. I decided to seriously consider integrating Bootstrap into the HTML script. But I won't start so soon... probably tomorrow night.

Today, I did three things:

1. Rush through the CS3226 lectures to check out the syllabus because I do not seem to absorb as well in this module as of now. Maybe it is also due to the fact that there are no videos. I felt like I caught up decently in SQL.

This looks like some Capture-The-Flag thing. Somehow I guessed it right for the first level, and of course I wasn't so lucky afterwards... but I managed to change the appearance of the website in level 2, making it really ugly.

2. Started checking out CS2010. I only watched the introduction to Priority Queue by the same lecturer in (1). I feel that this lecturer is a pretty popular one...

3. I tried to write a linked list interface (which seems to me like a public abstract class), list node data type (which is a public class), a basic linked list data structure (which is also a public class), and a basic linked list test class with the main method (which is yet again a public class).

There were so many errors that after I "corrected" some, others and more will appear. After much struggling, I gave up I looked at the uploaded files on the CS1020 module website.

I had a lot of mistakes in generic data typing and I got confused between similar-looking methods in different classes. Just because both methods have the same output does not mean they should be called in the same way because they are from different classes. Long story short, I got confused with the access (i.e. private).

The only correct files I wrote were the interface and the list node data type. Defining the data structure class was hell and I seek to improve.

public class ExtendedLinkedList <E> {
    public static void addAfter(ListNode <E> node, E item) {

    public static E removeAfter(ListNode <E> node) {

TailedLinkedList, DListNode, DoublyLinkedList, etc.
ADT: Stack, Queue, etc.
Sort: Bubble, Selection, Insertion, Merge, Quick, Radix, etc.

4. I received an e-mail stating that I need to submit a Scratch application too... I did some minor changes because my computer/Scratch lags and the music does not end in time to match with the bass entering in the second iteration.

I think there is just way too much music here but that's what I like and I might not even be the only one.

Labels: , , , ,

0 comments | Leave a comment

Saturday, 5 December 2015

I finished my simple application which allows users to choose which depth zone in the ocean to explore. Being a boring/studious person, the output is definitely an encyclopedia entry on marine life corresponding to the depth zone! My only qualm was that I have other priorities (i.e. studying Java) and so I could offer only one marine animal per zone. And the information site was Wikipedia.

Labels: ,

0 comments | Leave a comment

I am not used to the web console in Firefox so I jumped over briefly to Chrome to call "Ctrl + Shift + J". To my surprise, there are more errors here than in my personal blog (! Even though the HTML file is so much shorter. I am not going to explore this until I am done with my self-reading on other topics. On the other hand, I could ask to be spoon-fed! I really need to return to my original task... which is definitely not blogging about this.

Labels: , ,

0 comments | Leave a comment

I have to confess that it took me a few tries before getting the entire command sequence right. First, I forgot the colon in "" and had a slash in place of it. Second, I forgot the remote name in the same command. Apparently "git add" doesn't seem to detect any of my minor mistakes only until I try to pull and of course there is no such remote name. Haven't found out why but I'll be happy to be spoon-fed with the answer. My guess would be that in "git remote add ... ...", the second "..." is optional because the first "..." would have to be the remote name and the remote name can be set to point (not sure about this choice of word) to the repository URL upon another command which would set up this relationship..., or mapping.

My focus for today is on Vim. I don't think I want to memorise every basic command so diligently because it will be boring if I don't have to actually do the job. So nowadays I am using vim more often (also because it is more convenient in terms of opening an editing mode) and when I need to do something, I will search for the shortcuts in the user-friendly tip sheet written by Greg Hewgill on stackoverflow.

So far, in addition to the "i", Esc, "dd", and ":wq", in the past few days, I used and learnt:

1. Shift + G -> last line
2. 123G -> go to line 123
3. :/word -> search forward for a line with "word"

I may have interpreted the commands slightly wrongly too, but I am sure I can clarify those upon future observations. I am lagging behind the people in my cohort who studied the other programming module in the usage of Vim because they used it for the entire semester while I use it... largely for fun.

Labels: , ,

0 comments | Leave a comment

Friday, 4 December 2015

I think it is strange if I want to use a Ruby framework without understanding the Ruby language. I am able to read the standard logic and syntax like def, if, else, for, while but not those like:

some_array = (1..3) # I am comfortable with this from last time
some_array.each {|some_array_element| puts |some_array_element|}
There are actually 3 (or more) ways to write a program with the same output as the line above. I would really prefer the ordinary for loop.

And stuff like SomeModule::SomeClass is new to me.

Now I am really not sure if I am up to the job of using the Ruby on Rails framework...

Labels: , , , ,

0 comments | Leave a comment


Labels: , , ,

0 comments | Leave a comment

Wednesday, 2 December 2015

Achievement unlocked:
1. Created a directory and initialised it as a repository
2. Added remote name to the target repository
3. Pulled the repository from GitHub (now I have a local copy to process)
4. Edited the file with vim (but still inefficient with finding the line)
5. Staged the file with "git add"
6. Committed the file with a message (forgot about the -m parameter)
7. Pushed back to the remote repository

But I don't really appreciate the difference between "clone" and "pull". Someone said that the former has an additional tracking functionality. Hopefully I can appreciate this in the future.

Labels: , ,

0 comments | Leave a comment



About Blog

Anything geeky or nerdy shall be here!

About Me

Currently at a loss for words

My LinkedIn

Programming Languages

(in descending order)
  1. Python
  2. Ruby
  3. Java
  4. JavaScript
  5. C#
  6. Everything Else

Web Development

(in arbitrary order)
  1. HTML
  2. CSS
  3. jQuery
  4. Bootstrap, Materialize
  5. Hugo
  6. Flask
  7. Ruby on Rails


  1. Elasticsearch
  2. MongoDB
  3. Chef
  4. Ansible

The Hacks


    January to June

  • DSO: Defusing the Binary Bomb
  • DSO: Dynamic Malware Analysis
  • NUS AY15/16 Semester 1

  • CS1101S Programming Methodology
  • CS1231 Discrete Structures
  • MA1101R Linear Algebra I
  • MA1521 Calculus for Computing
  • December

  • GitHub

Contact Me


BiZiT Society
NUS Wind Symphony


NUS Computing Club
NUS Hackers


October 2015
November 2015
December 2015
January 2016
February 2016
March 2016
April 2016
May 2016
June 2016
August 2017
September 2017
October 2017
November 2017