On code and randori’s

We have been trying something new at work to kill the monotony.  One of our devs, decided it was a good idea to try doing a code Randori.  See the wiki link for further details of the origin of the name.  What this means in a developer context, is we practice techniques that will make us better coders.

We have less than 10% test coverage at work.  There I said it.  One of the goals of some of the devs this year, on my team, is to help change that.  Its said that TDD or Test Driven Development is where its at, so one of the things we practice is TDD.  TDD, as we have been practicing it, is writing a failing test, followed by code that passes that test.  It seems like a pretty reasonable way of doing things.

The other technique we have been working on in our randori’s, is a form of pair programming.  We put two people at the computer, one being the driver, the other the passenger.  The driver writes the code and talks aloud, looking to the passenger for help and direction as needed.  On top of this, every five minutes we rotate out the current driver, sub the current passenger into the driver seat, and pull someone new into the passenger seat.  This rotates the people in the room through the hot seats.

This is a pretty good system, and once everyone normalizes to each other it can be a lot of fun.  We found in our last session that some of the devs would write the least amount of code to make the test pass, something we dubbed ‘jerk mode.’  This provided great deals of entertainment, because it became a challenge to think of the simplest piece of code and test to write.  Also, it became a matter of what gross code you could leave for the next coder.

Im really glad we are able to do these sorts of things at my current company.  Considering the company itself is not focused on software, I find this pretty impressive.  Maybe it will even help me grow into becoming a better developer.  Stranger things could happen.

Posted in Uncategorized | Leave a comment

Life and Times of Me

I felt the need to update this.  So updates!

I finished school.  Wow that feels good to say.  Probably the hardest struggle I’ve gone through to date.  There were some trying times getting that degree, and lots of second guessing.  To this day I’m surprised that I was able to make it through.  So now I can say I have a Honours Bachelor of Computer Science Co-op program from the University of Waterloo.  Not to shabby, if I say so myself.  Convocation in June to get that expensive piece of paper.

I got a full-time real person job.  I was able to interview during exams for a position in Ottawa Ontario Canada, and get and offer of employment.  That was easy?  I ended up going back to an old coop placement as a full time employee.  The work is easy, the people are good, the pay is good and the benefits are good.  Ottawa is a great city, it’s just too bad I had to leave all my Waterloo friends behind.  With weekly hour requirements at thirty five hours, I have time to do other projects. Yay!

Goals for the year

I want to make something I can be proud of.  This will have to happen outside of work, since there is little room to ‘do my own thing with the tools I choose.’  During the interview process I went through in December I came to a realization.  I have been given many different opportunities to work with great people on interesting projects.  Despite this, there isn’t one piece of work that I have put out there that I get really excited about. To be fair, I haven’t put a whole lot of code in the wild.  But even so, this has become something that I feel I need to do.

I came upon a second realization while doing interviews: I am a generalist when it comes to my field.  For better or worse I have touched many different technologies, and am a master of none of them.  This makes interviewing me difficult, because an interviewer can’t quiz me in depth on any subject that I have worked at.  This being said, I want to release a mobile application this year to cement and legitimize my inclusion of mobile technologies on my resume.  I have already spent the money on getting an Apple developer account.  Now, a need, and some code.  Secondly I want to be able to say I can develop on any part of the web stack.  I have experience on all parts, but I feel like I need to make something on my own that brings all the concepts together for me.

Unfortunately, my generalist nature applies to the programming languages I know and use as well.  During interviews I was having a programming catastrophe; I didn’t feel comfortable enough in any language to say, this is what I’m best at.  It was an identity crisis.  This being a subset of the previous topic, I feel the need to become really good at one language in particular.  My goto language when writing out interview questions, if you will.  You may have heard of a language called JavaScript?  The one language to rule them all?  JavaScript is the language I want to become really good at.  It runs on every computer.  All of them.

In any case, thats enough for now.

 

Posted in School, Work | Tagged , , , , , | Leave a comment

Personality Types and Me

Personality types have always interested me.  We briefly talked about them in my Organizational Psychology class this term, and a couple terms ago in my Developmental Psychology class.  I’ve been interested in this aspect of myself for a while, purely out of sheer curiosity.

In any case here are my scores done by multiple choice questions (which are very reliable):

Jung Personality Test based off this test:

  • Introvert: 89
  • iNtuitive: 38
  • Thinking: 25
  • Judging: 78

The scores here are simply a strength of preference.  The higher the value the more true it is of myself.  This is what this test has to say about me:

  • very expressed introvert
  • moderately expressed intuitive personality
  • moderately expressed thinking personality
  • very expressed judging personality

The career page for my personality has listed computer programming and entrepreneurship.  How appropriate.  The librarian suggestion gets me the most.

Five Factor Model or the Big Five in Psychology based off this test:

  • Openness: 30
  • Conscientiousness: 92
  • Extraversion: 9
  • Agreeableness: 27
  • Neuroticism: 55

The numbers from this test are a percentile score that is comparable to other people.  The value after the quality is the percentage of people who have scored less than me in that area.  For example, this means I am highly introverted.  To the people that know me, surprise, surprise.

I wonder if my friends would agree with these scores.

I would be really interested in mapping these types of scores over type to map out how I have changed.

(PS. I don’t judge that often, promise)

Posted in Fun, Interest | Tagged , , , | 8 Comments

CS446 Marketing Page

As per my CS446 Software Design course we were instructed to create some sort of project that is useful.  I described the basic interactions here.

Ideally we would have released the finished product to the Android and iOS app stores.  Unfortunately, the Corona SDK license does not come free.  This would be on top of the respective costs of the app stores.  With this in mind, since we are only students, we will not be releasing it unless something changes.

Ideally I would have liked to create a YouTube video demoing our app, but ran out of time as the term expired.  What we do have is a nice little marketing page (that could use some work).  It shows the main screens, as well as some of the features of our game.  To be clear, this was created by four fourth year Computer Science students at the University of Waterloo.  It ended up mostly feature complete as to what we said we would do.  The biggest thing lacking was multiplayer support for the board.  As our whole was pulling all nighters before the deadline, this was the biggest feature that got cut.  As a result the game is mostly complete.

In any case, I walked away with experience with Lua, the Corona SDK, and Mecurial, not to mention “game programming.”  This made for a trying yet fun course project.

Perhaps a Youtube video is still forthcoming :)

Posted in School | Tagged , , , , , | 2 Comments

CS446 Technical Tutorial

As part of my CS446 Software Design class, we were asked to created a technical tutorial on how we solved a specific problem we encountered during our work on our project.

One of the problems we faced was how to add object oriented style to Lua.  From Wikipedia:

Lua (play /ˈlə/ loo; from Portugueselua meaning “moon“) is a lightweight multi-paradigm programming language designed as a scripting language with extensible semantics as a primary goal. Lua has a relatively simple C API compared to other scripting languages.”

Lua by default does not support inheritance.  What follows is how we used the features of Lua to create inheritance:

Tutorial

I’ll follow this up with the marketing page we had to create.

Posted in School | Tagged , , , , | Leave a comment

Klout, do you has it?

Klout is a social media meta analysis platform that assigns a rank to each person based on an algorithm that they have come up with, and have documented and explained.

Sweet.  Seems pretty cool, and if nothing else very interesting.

Why does it matter?

Does it really matter?  At this point in time, I feel like its a point of interest but not much else.  If you have a Klout score above a certain threshold it matters, since thats when the companies start coming to you to solicit their product.  But for me, with a score no where near that altitude, there isn’t much reward, other than maybe an ego boost.

I would like to know where they plan to go with their product, since they have only mashed up some different services.  For example, where does their money come from?  I mean getting funding is fine for now, but at some point they will want to become profitable.

In any case I curious to see where they go with it, and maybe I’ll learn something about my online interactions that I didn’t already know.

Note: I wonder how my score would change if they knew about this blog post…

Posted in Interest | Tagged , , , | Leave a comment

CS446 Group Project of Awesome!

Double Post Sunday!

In my final term here at UW, and the one computer science class I’m taking has a really interesting group project component. We have been challenged to create a mobile application that works on at least two platforms. We were instructed to use GWT, and Phonegap if we needed more device type hooks.

Naturally, I grouped up with some bright fellow students, and decided we would make a game. Now, realizing that performance would be a key issue, we immediately started looking at other technologies to create our project, considering that getting a game running in web technologies on a smart phone would be very very difficult at this point in time. We tried making an AIR app, but had trouble getting it running with a reasonable frame rate on the iPhone.  Good no need for me to learn ActionsScript.

Enter the Corona SDK.

Yes, yes the name of a beer, but also a cross platform tool that allows you to compile to native applications on Android and iOS.  Corona forces you to write in a language that has commonality to JavaScript and Actionscript, another new programming language for me to learn.  Sweet.

Game Concept: a Mario party esque game using physics based micro games as fodder for smart, fast, competitive gameplay.  Think, while you are riding the bus.  Admittedly the concept isn’t out of this world, but to us, it will serve our purposes of passing this class.

Start development.  Oh man learning Lua took me some time, maybe more time than I would like to admit.  In any case we were able to get a working prototype going and were one vote away from being voted most complete in relation to the rest of our class.  Now we have our final stretch to get this thing done by the end of term.

The future of our project may include releasing to the respective app stores.  There will also have to be an overhaul on artwork;  we are a team of developers with relatively small design skill.

Oh yeah, the name of our game? It’s Party Time!

If nothing else this has been an interesting twist to this course, where I expected straight design patterns all term.  If my writing seems disjoint and doesnt flow very well, it’s because I’ve been going at this most of the day.  Fun

Posted in Fun, School | Tagged , , , , , | 2 Comments

My js stack

In my last post, I mentioned that I have begun working at a start up.  The project is hush hush right now, but there are a few things I can mention.

  1. I’m working on a mobile app that will hit the major smart phone operating systems.  ie iOS, Android, and yes Blackberry.
  2. Since I have only done iOS development, I have decided to go with Phonegap.
  3. Given the above, I wanted to write JavaScript on the frontend and backend, and so Node.js became my option.
  4. To move fast, but also stay light, I’ve picked a slew of JavaScript libraries to help me along my way.  In no specific order:
  • underscore.js
  • backbone.js
  • zepto.js
  • ICanHaz.js
  • iscroll.js
  • and of course Phonegap.js

Will post more details when I can :)

Posted in Work | Tagged , , , | 5 Comments

Death, and updates on Life

Today I am cleaning up a lot of different ventures, in the hopes of focusing on one main venture.

Kwognchops is now officially dead.  I deleted the DNS records today, and pointed a different domain at the VPS that was Kwognchops.com.  This was supposed to be a joint project space where @kwogger and I would take over the world.  We had a few good things come out of it, me learning a lot about setting up a server, and the game we created with the help of another friend who lurks the internet for a Facebook Hackathon event.

@qqbot is also now officially dead.  This was a twitter bot I created on my spare time that would tweet random quotes a few times a day.  The ironic thing was this bot ended up having more followers than my main twitter account.  More to follow on the creation of this.

I recently joined a startup.  Currently I am the only developer, working with two awesome guys, working to make a product that could change the way we conduct our everyday lives.  Its on the DL for now, what exactly we are making, but I’d like to think, if successful, we will affect a lot of people.  We’re still in very early stages, but have registered a domain.  It’s exciting!

At the behest of my cousin, I got my m1, and then m2 license and bought a motorcycle.  The m1 and m2 license are comparable to the g1 and g2 license, since both follow a graduated licensing plan in regards to then being able to operate a vehicle on an Ontario road.  The plan is to ride motorcycles from here in Ontario out to Vancouver to visit my Uncle Ken and my cousin Marks friends in Kelowna, BC.  We decided it would be a good policy to let anyone else who is interested tag along.  So in that regard, a one Jimmy Yang decided it was an amazing idea.

Oh yeah, and my last term of my undergrad career starts tomorrow at uWaterloo.  This has been a long time in coming, and I honestly can’t wait to be finished.  Lets hope the upcoming term goes well, and I am able to maintain my motivation.

TL;DR : startup & school about to take over life

Posted in Fun, School, Work | Tagged , , , , , , , , , | Leave a comment

CS458 – Computer Security and Privacy Blog Post

This was written for one the courses I took, Security and Privacy, CS458 taught by Ian Goldberg. Unfortunately, in the original I didn’t explain why this issue is related to computer security, and the professor of the course rightly called me on it. I’ve included my response at the end.

Beginnings…

Breaking Scratch Lottery Tickets

Introduction

A geological statistician named Mohan Srivastava was able to find a pattern in tic-tac-toe scratch cards that when followed produced a winner 90% of the time.

Why is it important?

The North American lottery system is a $70 billion a year business, an industry bigger than movie tickets, music, and porn combined [1]. If any of the tickets being produced and sold have flaws it can have a big impact on the lives of the people buying these scratch cards. Srivastava figured he could make 600 dollars a day working the system.

Who is affected?

The basis of who is affected is anyone who buys lottery tickets. In the states about half of Americans buy at least one lottery ticket in their lifetime, but it is the poorest 20% that buy the majority of tickets [1]. Despite this there are a select few who appear to be the luckiest people alive. Joan Ginther has won more than 1 million from the Texas Lottery on four different occasions, as well 1$0 million from a $50 scratch ticket.

What impact might it have on people?

Potentially they could play to lottery at odds that are better than 50% and get a cash payout that could change their life. The example of Joan Ginther from above is a prime example.

How does it work?

To find a winner for the tic-tac-toe scratch card, with 90% accuracy, according to Srivastava, follow these steps [1]:

  1. Look over the card. Look for numbers that only appear once on the whole card.
  2. Make a plot of the card marking the number of times each number appears. A number that appears once mark with a 1, a number that appears twice mark with a 2 and so forth.
  3. If any of the 1′s that you previously marked appear in a tic-tac-toe formation, then the ticket is likely a winner.
  4. Scratch the ticket.

A lot of what this technique comes down too is measuring the frequency of the numbers that appear on the card. This idea was applied to other scratch cards with varying success. Another technique found being used by store clerks was, sell all the losing cards that come in the stack, and then buy the winners [2].

How might similar problems be prevented in the future?

It is impossible to produce an arbitrarily long string of random digits and prove it is random [3]. The problem with the tic-tac-toe game then comes from the fact that the numbers on the cards are not random, and a pattern is observed. Added on to this fact is that the companies making these cards want to regulate the number of winners and losers, and make the card appealing using bated hooks. Bated hooks force consumers to match up revealed numbers to numbers on the board, adding to the addictiveness of these cards. The best that can probably be done is an algorithm that creates pseudorandom numbers that appear random enough.

References

[1] Cracking the Scratch Lottery Code, http://www.wired.com/magazine/2011/01/ff_lottery/all/1

[2] Hacking Scratch Lottery Tickets, http://www.schneier.com/blog/archives/2011/02/hacking_scratch.html

[3] Random Number, http://mathworld.wolfram.com/RandomNumber.html

Endings…

Professors comment: What’s the computer security or privacy issue here?

Response: Computers are used to create the scratch cards using an algorithm that was created by humans. Since there is a problem with the algorithm used, it could be the case that there are similiar algorithms being used for securing computer systems that also have flaws in them. While, directly flaws in the security of scratch cards do not affect computers, indirectly, this suggests that algorithms we write need to be checked thoroughly, for the sake of keeping our systems secure.

This was a neat aside for a course that was very interesting, but unfortunately did not have the time for.

Posted in School | Tagged , , , , | 1 Comment