Sunday, December 15, 2013

What if money was no object?

Currently Listening to:
Noisestorm - Solar
Love Automatic - Save My Soul 

One of my favorite things to do in this world is problem solve. Other things that I love to do include teaching peers. These two passions of mine come together quite often, helping fellow students learn new technologies, or helping them understand something they didn't quite understand in class. I've quoted some of my favorite people in the past like Daniel Pink and Sir Ken Robinson, but today I'm going to talk about Alan Watts. One of my favorite lectures included the "What if money was no object" talk.

How many of you reading this actually like what you do at work? Maybe the environment is bad, maybe the people are annoying, but do you actually like what you do? Most people that I've talked to seem to not enjoy their job. This baffles me. They go to work day in and day out trying to make money but they don't like their job. They have the "fun" on the weekend. "All rech and no vomit" is the phrase Watts used to describe this mentality of forcing yourself to do this, "... you will spend your life completely wasting your time. You will be doing things you don't like doing in order to go on living. That is, to go on doing things you don't like doing... Which is stupid!"

Personally I love what I do. If I lived in a post-scarcity utopian society, I would still do what I do now. I may not be the best person to come up with an algorithm, I may not be the best coder, but at least I can say I love what I do. Asking students in the computer lab about what they want to do, I get plenty of answers that have nothing to do with coding, and to those students I've started asking why they went into computer science. "For the money" is a typical response I get. These students are about to graduate and they either don't know what they want to do for a living, or actively don't want to go into software development. I understand that knowing how to code can improve almost everyones problem solving techniques as well as help them with the day to day for their job (knowing how to script a mundane task saves you in the long run), but I have problems when the students seem to despise what they do.

Another issue that I've seen recently is the lack of effort on the part of the individual to better themselves. Ignoring the population that does not like what we do, we are left with those who I would assume are like me, motivated to better themselves over the weekend by working on a project, reading a book on the subject, contributing to a big open source project, or attending a conference/seminar. I've tried to put on events for my fellow students and peers in the area, including BarCampCHS, local programming competitions, helping with the Hack-a-thon, teaching teachers how to teach, and so on. However, when I start telling everyone to attend these events for the learning experience, or the meet and greet that they would have with local gurus in the community as well as people in a position to hire you, I get the same students every time. I've started referring to these students as "my go getters". They are the ones that attend/plan/promote all the events. All in all that is about 30 students that seem to enjoy what they do enough to want to better themselves. I can't say that the other students are bad, because honestly I haven't met them. They don't want to hang out in the lab (understandable, I know that I'm a very extroverted person and most of my peers would define themselves as introverted), or they don't think that going to these things are very important.

When I'm talking to some of my friends who do things in the local community I'm normally asked to give recommendations to them about who I would hire, and to pass on the message that someone is hiring to them (remember it is who you know, not what you know). Why would I recommend someone who I've only met once in the classroom who never speaks out. I would rather recommend someone who I've dealt with outside the classroom in a professional manner. The planning team of BarCampCHS sits pretty high on that list seeing as how I saw on a weekly basis their problem solving techniques as well as planning and execution of running a big event. Students who talk to me on a regular basis about interesting problems or new technologies are right behind them. The conversations I've had range from talking about ICPC problems, new technology stacks, hosting of web apps, design issues, high performance computing, low level hardware coding, open source licensing,  and many other topics that range from an individual problem to problems spanning the entire field of software development.

I've had conversations about why students don't want to do these things, and the mutual agreement is to just not even care about them, so consider this my last plea to those who don't seem to care (and honestly, if you are reading this either you do care, or you just like me): Instead of that one game of league maybe you could solve a problem on UVa, instead of going to r/funny you can instead read an article from r/learnprogramming or r/programming, instead of complaining about your grade in advance algorithms maybe you can implement your own library containing sorting algorithms and different data structures. I promise you, if you do these things you will feel better about your choice in degree/job. You will start to hone in on the part of programming/computer science that you enjoy most, because as Alan Watts said, "Better to have a short life that is full of what you like doing than a long life spent in a miserable way. And after all, if you do really like what you're doing, it doesn't matter what it is, you can eventually become a master of it. The only way to become a master of something is to be really 'with it' and then you'll be able to get a good fee for whatever it is. Therefore it's so important to consider this question. What do I desire?"

Saturday, December 7, 2013

Contributing to Open Source, Mentoring Improves Knowledge

Currently Listening to:
GoldFish - One Million Views
Approaching Nirvana - 305 

I've been working at Sparc for almost eight months now, and I can honestly say that having responsibilities outside of class related to your major will increase your skill level exponentially. I'm not talking about an internship where you are just fetching coffee for the people, but actually contributing to the workload in a meaningful way. This is what should be encouraged by academia, jobs that actually push you to try to maintain a work/life balance where work is split off into academia and a career.

My parents have always told me that I needed to take a job during the school year. I've done the jobs that were not related to what I wanted to do during high school (bouncy castle birthday party place), but during my senior year of high school I realized that I could get a job for what I wanted to do for a career (at the time), computer repair. During my senior year in high school, as well as the next 5 years of college (2 at Trident Tech for an Information Systems degree, and 3 years at College of Charleston working to a Computer Science degree) I did everything from go to peoples houses repairing computers, working at a chain store repairing computers, and being a systems administrator for almost three years. But I knew that after those 6 years of doing I.T. work, I wanted out. The grind of doing the same thing ("turn it off and on again") was becoming old hat. Sure I was good at what I did, and could make a nice living off it, but it wasn't what I wanted to do.

That is where software development comes in. During my time working on small projects (and some not so small projects) at school I realized that I enjoyed the problem solving that coding brings. Working on open source projects (the class that made me keep this blog/work on open source) showed me that I could make money solving challenges that I enjoyed working on. I applied to a few different places to see if I could get an internship around town for my last year of college, a few places responded back but I had friends who worked at Sparc, so I eventually decided to work there (I'll write a post about working there soon).

Working on a big project that you didn't help create is a humbling experience. Everything seems to be a jumbled chaos, you don't know why everything is written the way it is, and you don't know where to look for the simplest bug fixes. Reading other peoples code and understanding the flow is a gained skill, and thankfully my work on open source projects helped me gain those skills. After working at Sparc for about 4 months, they introduced a game to the company (on top of the Hackathon that they already did). A bingo board was produced with the top 24 most starred GitHub repos with 5 spots (4 repos and a free square) already claimed. The rules were simple, get a pull request in, receive bragging rights (as well as cash). The moment I saw the board I ran over to my computer and created a pull request to GitIgnore for a project type I knew they didn't have. After not hearing back within a few days my enthusiasm dwindled for that project, but I decided that I would want to work on projects that A) I use at work or home and B) would sharpen the skills I wanted to improve (Javascript specifically).

Eventually finding the Brackets project and using it at home I found a few solutions for bugs and worked on them over the weekend. I talked to a few people on the project and most of my pull requests were accepted! I was excited. Talking to Jeremy at work I learned I was the first one to get a request pulled. The feeling was great, I found something that I could help with outside of work that will help me with work. Around a week later I learned that my request for GitIgnore went in (Another one bites the dust goes here). A second spot on the board? My bragging rights just increased more, as well as my knowledge of software development in general.

wanted needed more more knowledge. Sparc was helping me learn Angular/Play/Design and other things, but working on these other projects helped reinforce all the things I was doing at work. Turning working on open source projects into a game made me want to learn more, to share more. Eventually I had to modify part of our code to implement Modernizr to check if the browser would support our new feature. Modernizr was also on the bingo board. During that weekend I learned a lot more about the Dom as well as how to create tests to see if a browser supports a feature. I decided that I wanted to work on implementing a test for the Keygen tag. But for the life of me I couldn't figure out why everything wouldn't work for me. Eventually seeking out help from Calvin at work, I learned about something called the Shadow Dom. I've never even heard of it because I didn't know where to look. Just having a mentor there who can point you in the right direction is a godsend.

After a few more days of banging my head against the wall Calvin and I had another talk, this time he told me that he was also working on a pull request for Modernizr. Game On. We spent a few days working on different things, me on my Keygen problem and Calvin his own feature detection bugs. We both opened up a second pull request around the same time because we wanted to gain the bragging rights (and with both of us working on two different bugs it means we still have the same chances of getting ours selected). Then it happened, "guess what? ;p" was the message. I've lost. But just because he got his request in first to me wasn't as bad when I thought about everything I learned over just that short period of time. Having someone there forcing me to try and become better by being a rival was one of the best things that I've ever done. I know that competition helps with the competitive "I want to be better" spirit, which is why I've started the coding competition practices at College of Charleston. It is what I believe to be the reason Sparc does the Hackathon, to help create a collaborative, yet competitive stage to help people become better at their craft.

So why tell you all of that? To help make a point. Students who seek out knowledge/mentors/competition will most likely have more fun than their counterparts. Attend events like POSSCON and BarCamp to improve your knowledge and find a mentor. Compete in competitions like the Hackathon and ICPC to be in an environment that will make you want to be better. Work on projects outside of the classroom (Open Source ones for community, personal projects for the itch (first lesson) that you will get to write something for a problem you know of). Those are the type of students I want to see more of.

Thursday, July 4, 2013

Creating a Reliable Testbed for Play Framework with a MySQL Database

Recently I have been working with the Play framework, and my job was to create a reliable test base class that would handle cleanup of the database after every test. Originally I was trying to use DBUnit to make my life easy, but I was never able to get the filter to work correctly to create the required flat XML file/dataset that is required to dismantle and create the database. Eventually (after a few days of frustration) I went a more direct path with my solution of restoring the database to a known state.

Using built in MySQL commands I was able to create a dump of the MySQL database at the beginning of the class (using @BeforeClass) by calling the system command "mysqldump". In Java it is important to note that the act of piping information is not available with the Process class, so the normal command of
mysqldump -hHost -uUser -pPassword Schema > dump.sql
was not going to work. The real command should be
mysqldump -hHost -uUser -pPassword --result-file=dump.sql Schema


Same goes for restoration of the database (which I do in the @Before annotation). Piping is not legal, so instead I used
mysql -hHost -uUser -pPassword -e "source dump.sql" Schema

Hopefully those of you using the Play framework will find this useful to create a simple backup and restore procedure for testing purposes. I would recommend using DBUnit if at all possible, and I do plan on changing it if I have the time, but for now this runs fast enough for me, and is reliable.

Monday, April 22, 2013

Google Code Jam Problem B.

Currently Listening to:
KOAN Sound - Sly Fox
Funkanomics - The Goonies Island

CSCI 462 has no more required blog posts. Now it is time to start blogging about specific problems I have been having as well as observations that I have.

Last weekend I participated in the Google Code Jam. This online programming competition is open to students and professionals alike. Out of the 4 problems I solved 2 of them with small and large datasets, and one of them with just a small dataset bringing my score for the competition to 80 (you only need 35 to qualify for the next round). My favorite problem to solve from a critical thinking standpoint was problem B, the lawnmower problem. 

The problem stated that if you have a patch of grass and a lawnmower that can only cut in straight (horizontal and vertical) lines, would it be possible to create the given pattern. Originally I was going to solve the problem by just checking to see if the rows and columns had a valid line, but this misses test cases. 

Eventually I got to the point where I figured that if you remove the smallest valid line that the lawnmower made (i.e. the last pass chronologically that the lawnmower made) and remove that line, you can work your way back in time until you have the original lawn. For the sake of simplicity I just removed the line out of my list completely and if I had a list of nothing it at the end of the loop was a valid lawn, otherwise if I still had stuff in the list something went wrong and it wasn't a valid cut. The method for checking is to find the smallest value in the list and checking to see if either the horizontal or vertical line was filled with the same values. So this is what a lawn looked like as it ran through the code:

2 1 2
1 1 1
2 1 2

(bold and underline is the smallest)

changed to:

2 2
1 1
2 2

which changed to:

2 2
2 2

which eventually turned into an empty list. That meant that it was a valid lawn. If at any point both the horizontal and the vertical check failed it would break out of the loop, which caused the "isEmpty" to be called and a judgement of the lawn set. My problem B solution can be found here.

Tuesday, April 2, 2013

POSSCON Report

Currently Listening to:
Hol Baumann - Endless Park
Can't Stop Won't Stop - Toys for Boys

I can't stress enough how comfy the bed was at POSSCON, just throwing it out there that I passed out early and woke up before my alarm.

I have been to POSSCON before but this is the first one that they held at the IT-oLogy building. I do like the facilities, but the space seems cramped in comparison to the locations of years past. During the first day I spent most of my time running the demo of Obsidian, not trusting myself to speak very much and let the code do all the talking after what I consider a mess up at the ACM meeting. We did talk to a bunch of people interested in the project. It seems like a lot of people want to extend Obsidian to work with .Net and C#. In reality it doesn't matter what language Obsidian is because the project is more about the design patterns which are just that, a pattern. Any language that has something akin to the Reflection library in Java could potentially create an Obsidian package to work with it. I know one of the people from the local LUG in Charleston caught up with me and asked if I'll try making it for Perl (Could be fun).

Right before lunch I caught up with +Eric Wages and had a fun conversation about what we have both been up to since the last time we both saw each other (must have been right after the last BarCampCHS). While talking Christian Heilmann from Mozilla showed up in our corner of the room. We all proceeded to talk about the new Mozilla Phone and how to target a niche audience. Eric had to leave to give a talk a little bit later so I got lunch at got back to the booth to do another shift.

After the first day of POSSCON there was the GitHub Drinkup. It was fun seeing old friends that I have made over the years hanging out. After catching up with a lot of people I hung out with the rest of the CofC crowd. It was fun to finally let loose after all the tension leading up to POSSCON finally let go. One of the conversations we had over drinks was +Tyler Sawyer's app idea with +Reece Long. Talking to Tyler about how he could make the app more modular in design to make more than one app was a good conversation. He could use the framework he should build *cough cough* (get on it Tyler) to create different apps for different customers. After the Drinkup a bunch of the students went out to get dinner at a local restaurant. The night was filled with stories and triumphs of the day, all concluding to the best bed in the world for my sleepless body.

The second day was more fun than the first. I got back into soldering and learned a bit about programming an Arduino (which I played Simon Says on for the rest of the day). Other than the Arduino class I spent my time on the Obsidian booth. Talked with more potential co-developers of Obsidian and got more feedback for it (moving to GitHub as I write this). During the wrap up of POSSCON Dr. Bowring and the rest of the CofC gang was called out for being at every POSSCON since the beginning and always being active participants in the talks. Obsidian was also acknowledged for being a student run project out of our department at CofC. It felt awesome for being acknowledged for being active members of POSSCON. Hopefully we will be able to send more and more students every year (one of the ideas thrown around by a few students was the ability for people about to take 462 to attend POSSCON, and then attend again while they are in 462 so they have the perspective of open source before they get involved and again while they are invested).

There was a dinner after POSSCON was over. I had a chance to chat with a professor, his recently retired wife, and a open source advocate for Microsoft. The four of us talked about everything from GIS, Remote Sensing, Open Source licensing, our favorite talks, my budding career in open source (I had to talk about Obsidian, remember, trying to get users), plans for after college, and why CSCI 462 at the school is one of the best ideas they have heard of in a long time. They all wished that their colleges had something similar. This shows me that CofC is onto something here with making a class requirement to contribute to a team project in open source.

Maybe other colleges will start trying to emulate that.

Tuesday, March 26, 2013

Reflections on my progress and plans

Currently Listening to:
Galaxy - Highlight Diver
Dan Pound - Esoterica (Part Eight)

So tomorrow is POSSCON. My team left today right after our ACM talk to go setup the booth for the event. I didn't sleep last night because of my impending fear that I won't get all the work done in time for POSSCON. I think I should have let sleep take over my body seeing as how I don't feel my section of the presentation was lacking in every way. I had to present a demo in front of everyone at the meeting, and my mind was going in a hundred different directions by the time I finished my part of the presentation. The team left after our talk and I stayed in the conference room to finish up more bug fixes and documentation issues. I feel like I let some members of the team down because of my performance today, but I can take solace in the fact that normally I strive under giving talks in front of people (See: BarCamp). Today was just not my day.

I finished my documentation that I wanted to get done and submitted the final diff to Hunter for a bug that I wanted fixed before we debut at POSSCON and proceeded to take a nap. Currently Obsidian is the only thing that I have been working on, and I have been mostly neglecting my other work in other classes. So while the progress has been great on the front of releasing an open source project I feel that on a personal level I should step back and not try to bite off more than I can chew. Currently I want to be on par with the inner workings of Obsidian as Hunter is currently, but that will take more time seeing as how he has a 2 year headstart.

I think the whole team was feeling the stress for the past few days. Sleepless nights of work for the past week have taken its toll on the whole team. I know that looking back on this in hindsight is going to be a great experience, but for next semesters 462 class I will warn the people who want to make their own community that it is a lot of hard work and sleepless nights to make it good.

Oh, and Happy birthday to me. My birthday was this past Sunday which I forced myself to take a break and have dinner with my family. It was fun. I'm most likely going to be buying that mechanical keyboard that I have wanted for a while now with the money I received.


Time for bed so I can wake up early tomorrow to drive up to POSSCON. Wish me luck.

Thursday, March 21, 2013

Preparing for POSSCON

Currently listening to: 
Kettel - Boekebaas 
Bassic - Daydreamer

Adding a currently listening to. I think I'll start adding that to my blog posts from now on seeing as how some of my friends ask me for new music to listen to all the time, I might as well give them a easy way of finding new songs ;)

Finally the blog where I get to pick the speakers I'll be going to attend during POSSCON. A few of my friends are actually going to be presenting at the event and I have been asked to attend their talks, but I'll list the talks that I'll be attending for the sake of the class instead.

The first talk that I want to attend is one that I already signed up to do with my current boss Clay. There is a special workshop held on the second day where SparkFun is going to be teaching us how to solder, and then later in the day teach us how to program our newly made simon says game. The class is going to be held by a few people from SparkFun and should make an interesting second day to POSSCON (that and I get to annoy Clay on the ride back by playing simon says the ENTIRE ride back to Charleston. I'm sure he would love that).

The second talk that I want to attend is actually a SparkFun employee who is giving a talk on how to teach STEM in schools. Lindsay Craig will be leading the session. I have already talked about my wanting to work in education here, here, here, and here. So I feel like this is a class that is almost required of me to attend. Hopefully he talks about motivational techniques like gamification and other types of external and internal motivators that we can instil in the younger generation.

The third talk that I want to attend is "Javascript: the language every developer should know" by Tom Wilson from Jack Russell Software. Seeing as how I have met Tom a few times (BarCamp, Code workshops for test driven development, Hack-a-thons) I feel like I should trust him with a title that has an absolute, "Everyone should know". The abstract for the talk indicates that Javascript has matured to the point of being something beyond just a scripting language, and I feel like I should look into it more than I have in the past.

Other than attending the talks my job during POSSCON will be to sit at the Obsidian booth giving out stickers and showing off the functionality of the project. I can't wait to see if there is any hype or feedback from them. Besides, I'll be keeper of the stickers that everyone in our class wants so bad >:D