Friday, July 27, 2012

Global Edge - Working During a Typhoon


Work

So this week was mildly not that exciting in terms of work. I managed to get some things done such as getting the interface Michael Chow designed fully integrated into the system. That works now though, so we can actually connect onto a remote file and authenticate the user's log in from the local client, and then access a network database to retrieve data for things as well.

All and all that's pretty cool.

Ugh I still hate 2008.

But that's not what I want to talk about today!

So on Monday there was another typhoon that hit. Typhoons are relatively common in HK, especially during this time of year, so that's not that big of a deal. However this was a level 10 typhoon, meaning it's the strongest typhoon level they have.

Rain. Many rains.

I've always wanted to experience a level 10 typhoon, my parents always talked about it. But they haven't actually had one in the last thirteen years, so I can say that I was in HK during a level 10 typhoon and feel aewsome about it.

However I actually totally slept through it. It got classified as a level 10 typhoon in the middle of the night, and when I went to sleep it was still a level 9 typhoon. However I was outside during a level 8 typhoon since I was at work when it happened and I needed to like leave.

This picture doesn't do justice as to how long the lineup was.

Normally I normally get off work at about 6, but once the typhoon reaches level 8, everyone is supposed to drop what they're doing and get home. The public transit stops running by that point and stuff, so at about 5 that day I decided to leave work.

I didn't really want to leave work though. I was in the middle of debugging and issue and I was literally minutes away from solving it, but I had to leave. As a result I left kinda disappointed and just kinda stood in the rain for forty minutes while waiting to get on the bus. Note, it normally takes about five minutes max. But there were a lot of people.

This is me after not being able to solve a programming problem. And then standing in the rain.

The next day it was back down to level 8 when I woke up, so I didn't have to go to work. Somewhere around 10 or 11 it dropped to level 3, so after lunch I went back to work. Then, I finally got to fix that issue I wanted to fix.

Felt so much better about myself after that.

Misc


The biggest thing I did this weekend was go to Lantau Island to see the Big Buddha. As the name implies, there is a big Buddha. It's like a pretty cool statue thing that's on this mountain on this island you can go to. It's a pretty big tourist attraction and since I've never been there before, I wanted to go.

It was a reallllllyyyyy hot and sunny day that day. Like I felt like I was dying it was so hot. But it was totally worth it because statue was pretty cool.

It also helped that there was a really awesome breeze up there.

We took a bus up to where the statue was, and then we had to climb a bunch of stairs to actually get up close to the statue. But at the end of the day it was just a statue, so even though it was cool to see, we didn't really do too much there.

After that we went back down the stairs and headed over to a temple shrine thing they had near there. But before we did that we got some drinks and the dumb mosquitos bit me again. Not as bad as last time, but it sucked. The temple shrine thing was cool, but it was honestly more of the same things I've seen before.

Giant incense are giant though.

Afterwards we decided to check out the Wisdom Path they had near there as well. People told us it was worth checking out, so we decided to go.

After walking for about ten minutes in the heat, we managed to get there.

It was actually pretty cool.

The Wisdom Path was essentially a short path area thing where they had a bunch of trees that were cut like so, and then had words of wisdom etched into them and displayed for the world to see. However since I am illiterate, I was unable to read the words of wisdom, but I'm sure they were full of them.

While we were there, another Chinese family was there too. So I asked them to take a picture for us (it was me, Chantelle and Rene). So the girl I asked said sure, and took a picture for us. Immediately after, her mom comes over and is like "Hey can you take a picture too?" and I was like yea I could totally help them take a picture. But then her daughter runs up to us and her mom snaps a picture of the four of us on her camera before we could really react.


It was them.

We were all so confused, so we kinda just awkwardly walked away.

Later, we decided to take a trip back down to the subway station via cable car. We got the crystal version cable car, so we paid extra to have a glass bottom in the cable car. It was pretty cool.

I saw many trees that day.

That pretty much wraps it up for that trip though. I feel like I skimmed over it too quickly, but it was pretty fun, I have a lot of other awesome pictures too. Maybe I'll talk more about it some other time.

Another thing I did this week was watch the Dark Knight Rises. Now, Batman is awesome. DKR was awesome. But as a giant nerd, a few things bugged me in terms of the details they had with the characters. It just, made certain things feel off. Overall though it was an awesome movie. Just felt like they couldve done a few things better.

TE;DR

我星期六去左大佛。又好熱,又好曬。星期一有十號風球。我平時六點放工,但係我個日要五點走。我等巴士等左八個字。上車之前好鬼大雨呀。

Friday, July 20, 2012

Global Edge - Overtime and Presentations

Work

So as far as programming goes, this week has been fairly normal in terms of development. A few things were achieved, a few things were fixed, and progress has been made. I'll go into that more in a bit, but on Monday we had to demo what we had to Baptist University, as a result my prof told us that we had to come into work on Saturday to make sure we would have our demo ready.

As a result, I worked 10 - 7 last Saturday. Coming in on the weekend kinda sucked, especially since there is apparently no air conditioning in the building on the weekends. However our prof treated us to lunch, which was pretty awesome haha. Progress was made that day.

MaXit working like a boss, featuring Michael Chow's hand.

Now, as a person in an IT field, it's pretty much expected that we'd be working overtime eventually. It's not really a matter of whether or not you get any, but really a matter of how much overtime you get. Luckily at BeaconWall, we have a pretty relaxed environment. We normally only work 10 - 6 Monday to Friday and it sticks.

But due to the demo on Monday, we had to come in at 9 that day. Also since we had a presentation to do at the MTR on Tuesday, I also had to come to work on Tuesday at 9. So this week I essentially worked an additional 11 hours, but honestly I don't really care that much haha, it's not too too much.

Plus I got to go to the MTR headquarters!

Since I was in charge of doing the remote demo on Monday, I actually didn't get to physically go to Baptist University to demo it. However from the office I was in charge of essentially leading the remote demo by getting on Skype and running through the functionality and features of what we currently had working.

However, I actually got to go to the MTR for the product pitch presentation thing that we had to do. That was pretty cool since I've never actually went to a legit business meeting before.

They also had scale models inside their building.

The day before I went I went over the presentation and tried to familiarize myself with the pitch that they were doing. It was pretty straightforward but I still wasn't too familiar with the details of the system. But essentially the MTR is looking for ways to improve their non-Octopus system, AKA their ticketing system.

As a result our company BeaconWall and some of our partners are presenting an idea to them that would give a digital option to the tickets that would be based on your phone. I won't go into specifics, but I'm personally pretty hyped about this project because if it goes through, this would actually be a pretty big project imo.

Rob had a great idea. IT tours man. IT tours.

The meeting started off pretty hilariously because there were like 15 - 20 people in the room. Everyone was Chinese except for Rob. Everyone was given tea by the person handing out drinks except for Rob who got water. It was actually pretty funny haha.

The presentation started with me and Michael Chow doing a power point presentation. He talked more about the actual system that we proposed and I talked more about the concerns that need to be addressed, research that was done, and so on.

Rob prepping the presentation. With his glass of water lewl.

After that Rob showed them a quick demo of a prototype we had. With that completed they spent a bit of time asking questions and discussing the logistics and ideas of the system we proposed with the other people that were there.

Afterwards, we were taken on a short tour to the operations training centre they had to show us some of the ticketing machines. For the people that do not know, Hong Kong subways systems are awesome and are very efficient. It was cool, because the entire room was filled with every single machine type found in the subways for testing and stuff.

Apparently the fare saver machine actually worked too.

They even opened up one of the ticketing machines so we could see what was inside. That was pretty interesting since at the end of the day, it was just a fancy computer. Well it wasn't even that fancy. But it was there.

It was kinda cool to see. I use these machines many times a day, but never really pay attention to them.

Dem components.

After everything was wrapped up, we got treated to lunch again. Which was awesome haha. Free food is the best. I love it.

Aside from the various meetings we had, I was back to programming during the rest of the week. Not too too much to talk about, mostly just debugging fixes, changing some UI stuffs and integrating more features. The highlight of this week in terms of was definitely the demos (and free food).

Misc

A few interesting happened this week outside of work. For one, I've been eating a lot more this week due to free food. Also I've acquired a rice cooker. Long story and I don't really want to go into it here >_>

Aside from food related things, I really need to get a haircut. I normally get my hair cut like once a month or so and the last time I cut my hair was like the day I left for Hong Kong. So it's been like over a month and a half now. My hair is getting so annoying I really need to get it cut.

I have this fancy Groupon from here though. (Group Buyer)

I tried calling them to set an appointment one time, but they never called back. So I had Rene call and they also were like "We'll call you back" and never did. So we just decided to go in person to book appointments, since a lot of us need to get our hair cut.

So we walked there last night after work and by the time I got there I was pretty tired and felt really lazy. As a result I decided that I was going to hang back and have Fidel and people try to figure out how to book an appointment haha. The salon people weren't the greatest in English and that proved to be an issue, so after about five minutes I stepped in and the salon person was like "What?! All this time and you could speak Cantonese?!"

Kekekeke. (Knowyourmeme)

So I finished booking the appointments we needed, and the girl in charge of the bookings was like "You we're totally trolling my co-worker" to me in Cantonese. I just laughed. Thankfully it means I'm actually getting a haircut. But unfortunately it's going to be next week so I have to deal with this hair for another week ugh.

So my last thing for this section actually happened today on my way to work. I actually got stopped by the cops.

Yea. (Wikipedia)

I was walking to the subway station from where we lived, and then two cops approached me and asked me to show them my ID. So I did, and they asked me a few questions like "Where are you going?", "What do you do?", "Whats with the bag?", etc etc.

I answered all of their questions while one of them was writing stuff down in a note pad and radioing to whoever was on the other end of the walkie talkie while the second guy was kinda just checking out my UOIT bag.

Two ethernet cables in my bag like a boss.

It was weird. I was actually kinda worried that I did something wrong, but after talking to a few people and my prof, I was a bit more relieved since apparently they do this pretty often. They might just be looking for a suspect or something and if you match a profile they stop you and ID you.

Obviously I didn't do anything, so they let me go. But apparently I look suspicious enough and/or like a criminal. Great.

TE;DR


我上個星期要加班因爲我哋要做兩個presentation。加班個日,我個先生同我哋喝茶,所以我覺得要返工都冇問題。我有得食免費餐已經好開心gah la。但係食得多都好次唔係咁好囖。

Friday, July 13, 2012

Global Edge - Turning a Phone into a Controller

Work

This week has been a lot more successful and less frustrating than last week. I managed to finish all the major debugging I needed to do, so the base framework for what we needed was setup. As a result, I could start actually doing things, and I love actually doing things.

The first thing I did this week was to integrate the classes I had setup into the main MaXit software. It required some work because for one, MaXit was developed in Visual Studio 2008 and I've pretty much only used 2010 so that a few things needed to be changed and altered.

Ugh, I like 2010 so much more than this.

Another integration issue I had was that since MaXit was designed to be Chinese/English bilingual, I had to change some chars to wchar_ts and some strings to wstrings. Apparently unicode characters are pretty good, so you had to reflect that in your code.

Once everything was setup though, we could actually start testing things. The computer we got from Baptist University last week serves as the main MaXit computer, so I could test out the system there. Since authentication was already done, I could move on from there. The first thing I did though was to put my webserver class into it's own thread so it could run independently from MaXit.

Look! It's waiting for socket connections and erroring at the same time!

After that I started getting the play/pause functionality to work. In the actual MaXit system we want to be able to control the software's video capture functionality from a mobile client, but since unfortunately our cameras aren't working, we had to settle with play/pausing video playback.

It all really works the same really, just a different set of function calls in the code. Between some debugging in the web client side and some on my side, me and Rob were able to get everything work properly meaning that we were able to process requests from the mobile client and react to it in the main program.

It took me way too long to figure out how to pass and call member function pointers.

Since we decided to test the system using video playback, we needed to get some avi files to test them. Luckily I had some on me so I copied them over to the MaXit computer from my laptop and started working from there.

After everything was complete, I ran the software and started to test it. Naturally I got it to work because I'm awesome like that.

And of course I used Ultraman as the test video because that's how I roll.

With that working, we decided to take it one step further and to actually test it on our phones. The way we have it set up is that the "mobile client" is really just a web page that can be accessed locally from the local network. So as long as you can connect onto the local network, you can access a special web page.

So from your phone, you could in theory log in, which would send your login information to my program then to the authentication server to validate it. Once you logged in, you would be able to start and stop the video playing on the computer from your phone. Which is actually pretty freaking awesome haha.

I actually didn't have any Victory Soup. But I really should've.

So in other words, I now know how to connect web pages to a C++ program and process requests. I can also send data from a C++ program to a PHP file online and gather responses. I can jump between both of these things too so I can easily send data back and forth.

Which is actually really sweet. 

As sweet as this Hello Kitty McFlurry.

There's so many potential applications for this too. For example, imagine we make a game that has a single player mode. You log onto your character and it retrieves character data from a server and you play. You can also save your character data back to the server so your save data is no longer bound locally.

And then you want to play with your friends. So both of you pull out your smart phones and use those as controllers and play some LAN multiplayer. The game client on your computer will react quickly and responsively to your actions on your phones in real time.

Exactly. (Knowyourmeme)

Man programming is damn awesome.

Misc

So this week I didn't really do too much aside from work so I'll keep this section relatively short since my above section was actually somewhat long. The highlight of my week was definitely the concert I went to. Yea, I went to another Hong Kong rock concert haha.

There's three bands I really like from Hong Kong, King Lychee, Mensheng and Tieshulan. I would type their Chinese names instead but remember, blogspot doesn't like Asian characters. I went to a Mensheng concert last time and King Lychee actually was one of the opening bands, so I killed two birds with one stone there.

It was like their last concert as a group though :( (Facebook)

I missed Tieshulan's concert last time, but I found out they were performing in a competition, so I was like I'm totally going. 

So I went.

Tieshulan is actually pretty good, check em out.

The night was pretty fun, the venue was a lot nicer than the last one but the music was less hardcore metal and had a bit more of a variety to them. Tieshulan was of course my favorite though, and they were also the heaviest band there haha.

Unfortunately though, they didn't win. Turtle Giant ended up winning. And although they were good, it doesn't feel right to me that a group of non-Chinese people ended up wining PlanetRox China. But what can you do I guess.

Except take a picture with the vocalist of Tieshulan!

TE;DR

我上個星期寫左d code 咁我可以做d唔同d yeh。我可以用我個電話同我寫個d program溝通。我想有一日可以寫一個game用我今次學 dod yeh


Still takes too long to write -_-

Friday, July 6, 2012

Global Edge - Debugging all the Things

Work

This week at work has been kind of frustrating. As any programmer knows, programming really isn't about writing code, it's about debugging code. You spend like ten minutes writing some code, and then hours debugging it. That's how it works.

Now, I'm no stranger to debugging code. I do it all the time. But the issue is that the stuff I'm doing now is stuff I've never done before. I'm not experienced at all in doing any web or network programming. As a result sometimes I get some errors that I really don't know how to fix, and it can get kind of frustrating.

Hey look there's a Bidoof. (Bulbapedia)

Since last week's entries, I had to debug so much I can't even remember what I debugged anymore. Aside from linking my code to the actual mobile application we're using, nothing new really got done this week since debugging takes forever to do.

I'm also not very familiar with how threads work, so debugging with a thread mindset is somewhat different. Normally in the programs I write I don't multi-thread, so I could just debug with a linear mindset. But with threading, all of a sudden things can happen that you don't expect just because threads like to toy with your emotions like that.

It's the worst when they all get tangled together too. (Wikipedia)

Getting used to doing that has definitely taken some work. I still haven't got it down yet though.

However I learned a few things. The first is that char arrays are really bad when it comes to memory allocation. So many things can go wrong if memory isn't allocated and deallocated just correctly, especially if threads get involved in which case things can just straight up get deallocated while they're still being used, which is a pain.

I spent so much time figuring out that lazy code is so much better than not lazy code.

Code just stops working if memory isn't managed correctly apparently, and that's pretty much been the story of my life the last week. Literally everyday I would sit down and debug a crash for a few hours, solve it, then immediately encounter another one, and spend more time working on it.

Rinse and repeat for the last week. Naturally it hasn't been the most fun week, but I've definitely learned a lot from the process though.

Also I got a second computer.

One thing we did do was that we went to Baptist University to pick up some computers for our project. It wasn't too too exciting as we just kinda walked there, went to the computer science department, and pretty much just introduced who we were and the guy gave us the equipment.

He didn't even ask for any identification or proof. He just wanted to take a picture of us. And although he had a legit camera at the ready, he ended up using his phone instead. It was kinda sketchy.

This is one of the computers we got. It boots up really fast.

Oh also. Another reason why I hate char arrays is because when you work on a system with Chinese characters, all of a sudden everything needs to be unicode and regular chars don't cut it anymore. Same with regular strings. Gg wchars and wstrings.

Misc

Nothing really that interesting happened outside of work this week. The Hong Kong students that we met flew out to Canada and the States though, so we can't hang out with them until they get back. That pretty much just means I'm stuck hanging out with the other Canadians or my other friends from Canada or my relatives.

Oh, I remember now. We also went to a Canada Day celebration on June 30th. The Canadian Chamber of Commerce here wanted to set up a a celebration for Canada Day, and we were forced to volunteer. I personally didn't really want to go, but I had to so there I was.

This is me being excited to be there.

The weather was somewhat miserable in the early afternoon as it was the day after a level eight typhoon, but it luckily cleared up. Unfortunately though was the fact that we had to stand for the entire day at our stalls.

The event was supposed to end at 12 and then cleanup should've ended at 1 so it would've been reasonably late, but luckily (or unluckily) they designed the games pretty poorly so most of them required tossing balls. Now. Tossing balls is ok, but Lan Kwai Fong (the place where we held our event) is actually on a pretty steep hill.

Let's play "Where's Michael Chow?"

As a result most of the night was us chasing balls down the hill. It was not very fun. Especially since there were a ton of people and it was still like 28 degrees out. However due to the fact that we had to chase balls, we ended up losing most all of them by 11, so we we're able to leave early.

Other than that, there really isn't too much to talk about. The weather has been alright-ish lately. There was a typhoon on Friday and there was a bit of rainy aftermath on Saturday, and yesterday when we went to Baptist University there was an amber alert rainstorm.

It's ok guys, I have the sickest umbrella now.

I've also been cooking a bit more. Went grocery shopping the other day and got two bags of veggies for 12 bucks. Which was sick, but I have no idea how I'm going to finish them all before they go bad haha.

Oh we also watched Spiderman after work on Tuesday. Apparently it's the same in Hong Kong in the sense that Tuesdays are cheaper when you go to the movies. That's good to know, since Dark Knight is around the corner, and I really want to watch that.

BATMAN. Coming out earlier in Hong Kong because Hong Kong is awesome. Also Batman USB.

TE;DR

Alright so I've been here for like a month and a bit already, and one of my goals is to improve my Chinese literacy. In an attempt to do so, I'm creating a new section here called "Too English; Didn't Read", or TE;DR for short. I promise there will be less English (in this section) next week. Also since apparently Blogspot doesn't like Asian characters and I don't feel like debugging it, highlight the white with your mouse >_>

Essentially what I'm going to be doing here is to write a few sentences at the end of every blog post in Chinese. I'm going to aim for at least 50 characters an entry. It's going to be really bad, but I'm going to try. The goal is that when I get back to Canada I'll look at this entry and be like "Man, this entry was pretty bad."

Why are you so hard. (Wikipedia)

我上個星期做左唔係太多yeh (>_>)。我想做多d gah, 但係我要debug好多問題,所以我冇可以做我想做個d yeh. aksjnflksanf,寫中文好鬼難呀。我又唔識好多中文字,我又要用好多時間寫我想寫個d yehGoogle同我個電話好有用呀

Oh man, I don't even need to wait until I get back to know that was really bad. Be gentle >_>