Corner of Seven Helping Tech and People to Get Along

18Jun/100

50 Lines of Code – day 2: more LWP

More Paint LWP work... See gist at bottom. Anyway, all I've been doing is just letting my hands type out the general idea of what I want. I have yet to test it in any emulator or device, to make sure it's doing what I think it is. I just want to make sure I'm writing things correctly; the first write is to learn it, the second to create, and the following to master. Once I've got the idea solid (and I think I'm getting there), I'm going to write one of these more simply: instead of four colors, only one moving paint dot. And that way, I can really start testing what I'm looking for. I'll get some more time tomorrow, so expect a new copy of this, a little simpler and more testable. Maybe I'll even have a package to distribute - wouldn't that be nice. :)

Tagged as: , , No Comments
17Jun/100

50 Lines of Code, Day 1: Live Wallpaper

My first 50 Lines of Code entry, is the beginnings to an Android 2.1+ Live Wallpaper.

Called Paint, the idea is to have four main colors at the edge of the screens. By the phone's tilt, those colors will bleed into the screen itself, causing the animation, and interactivity with the phone regardless of whether or not you're actually accessing an app. The LWP actually becomes as fun to use as anything else on the phone. :)

The basic setup is contained in this Gist.  There's more to add, but I made my quota for the day, and I want something to work on tomorrow. :)

17Jun/100

50 lines of code

I haven't written much code, for being a Comp Sci major.  I feel like sometimes, I get further and further behind my peers because they have the opportunity to write the code that I don't.

I'm giving myself a challenge, and having my blog (Corner of Seven, for those of you reading this via Facebook) become the record of my success or failure of this challenge.

Starting today, my goal is to write *at least* 50 (fifty) lines of code per day.

This idea came about through the previously mentioned "Don't Break the Chain" post on this blog (which worked oh so very well...),  and a recent experience that I had at work.

Most of my work duties are currently system configuration and setup, and less actual development on said systems.  With that, my ability to get code written has diminished.  I was asked recently to create a component in our software that renamed a file going out, based off of metadata contained within that file.  After sitting blankly at the computer screen, with my brain screaming, "I know what to do!!!!" and my hands frozen, unable to regain the muscle memory of the common actions of Java, I looked inside, and realized this had to change.

In a sense of betterment, I want to complete at least a small project daily.  Maybe it's a coding kata. Maybe I work on stuff in Android.  Maybe I continue work on RBEQ.  Maybe I add new things to Corner of Seven.  Maybe it's something I haven't even thought of yet. All I know is that new code needs to come out of me, before I can't do it any more.

Fortunately, I have tools at my disposal.  The afforementioned projects can keep me busy for a while, but what do I have to show the work that I've put in? Enter the Gist system at GitHub. This allows you to put small snippets of code out, configurable by language; it gets your code available on the internet, and embedded into a blog or webpage.

So there you have it.  Look to see some Gists from me shortly.

Cheers!

21Mar/100

Exploring the Droid

Recently I've been having a lot of fun playing with my new phone.

The previous statement isn't much of a surprise in this day in age, but I think I should qualify what I mean.

I've been having a lot of fun playing with the software internals of my new phone.

31Oct/090

Eclim and Android

Since deciding to start working with Android and see just what I would be able to accomplish with the SDK and devices, my biggest hurdle so far has been Eclipse.

Now that most of the Java developers have now either cringed, cried, or shot themselves, I'll explain why. From the outset, I have never liked Eclipse. Something about the way the program is presented, coupled with the fact that I could never seem to get it to act the right way (either something was going haywire, or breaking, or the IDE would crash in front of me). During college, there was a brief push to get us to try Eclipse, and that's where my dislike of it began. We were moving from BlueJ (which, although it serves as a nice Java text editor, doesn't really count as an IDE in my mind) to Eclipse, roughly around the same time that Netbeans 5.0 was coming out (late 2005, for those keeping track). Once I started working in Netbeans, I saw no reason to move back - things behaved when I asked them to do something. When I made a new class, it automatically put it in the right package (Eclipse: Default package? What?), When I added a wsdl reference, it allowed me to edit it on the fly, and auto-generate the interface class for me. It was perfect for any big Java job I needed. Anything smaller, and I'd drop to a text editor, like KDE's Kate, or vim. I essentially lost any reason to go back to eclipse.

Fast forward 4.5 years. Android is coming out big. I mean, Really Big.Phone announcements like the HTC Hero, Motorola Droid, and Sony Ericsson XPeria X3 have captivated the tech world, and even some people outside of it. It's around this time that I decide to buckle down and really start on some Android development (it gave me a reason to buy a new phone, too, but that's beside the point :) ). Unfortunately, I found that Google, in their infinite wisdom, had chosen Eclipse as their base platform for Android development.

Naturally, I first tried it on it's own again, to see if anything had improved. Certainly it did in the four years of not using it. But things still felt uncomfortable. Load times were atrocious, and the interface was not nearly as snappy as what Netbeans provided. When I tried a plugin for Android in Netbeans, though, things were shaky at best. I wasn't sure whether or not the correct things were loaded, it didn't have AVD controls, and other issues kept me at bay.

It wasn't until this morning that I found the answer. Often times, when I'm faced with editor anger, I turn to a more lightweight friend: VIM. I know that there is a lot of power packed inside this text editor, I've just never had the energy to learn about all of it. That may change, as I stumbled upon this page in my android search today: http://jyro.blogspot.com/2009/05/android-development-with-vim-eclim.html. Go ahead - visit. Take a while to soak in all that it says and provides. I'll be here when you get back.

See, that's awesome. I went out and immediately pulled down this Eclim extension, which acts as a handshake between what Eclipse provides on the back end (error checking, dependency resolution, and automatic imports) without the headache and body of running eclipse on it's own. I've been working with this for the better part of the day so far, and let me tell you, it's been fantastic. I've been working on the Sudoku example given in Ed Barnette's book "Hello, Android!" (get it if you're interested in Android Development), and can't believe how fast it's being put together. Best of all, it lets you do this in VIM:

Now, if you ask me, that's pretty cool.  Back to code. :)

28Oct/090

Don’t Break the Chain

After reading this post on LifeHacker, I couldn't escape the feeling that I should start doing something like this.  I mean, it works for Jerry Seinfeld, it can't be all that bad. :)

Basically, as described on the link above, the idea is that you keep a daily calendar of all the specific goals you want to accomplish.  Every time you do something related to a goal,  mark off the day on the calendar.  Once you have a few days consecutively, that is a chain.  The object of this motivational strategy: Don't Break the Chain. Seems like a simple enough thing.

In the spirit of bringing in new ideas in order to make things work, I'm going to use a modified schedule, but the chain still takes effect.  Different days for me will be devoted to different goals/tasks.  Mondays and Thursdays I tackle some Ruby code, so I can stay fresh and learn about some of the newer developments that I've missed, having been out of the Ruby loop for a while.  Tuesdays and Saturdays are devoted to Corner of Seven.  That's right, you might actually see more blog posts. In addition, I'm looking at building new and experimental pieces onto the domain, including rails and Java webapps, and playing around with php and python, so I can apply these to the blog, and keep the site as a form of digital portfolio.  All of my things will be up here, so it makes it more centralized.

Motorola Droid

Motorola Droid

Finally, the big hurdle in my calendar, and what is to be the biggest chain - Android.  I've been looking at the mobile phone operating system for a while now, but haven't had the drive to fully enter in and create things for it.  That is, until I saw (and afterwards, held) one of these.So, starting today, once a day I will try to do something new in terms of Android development, in an effort to increase my skill and knowledge in the mobile OS.  Hopefully we'll get to see some neat little apps come out of this "Don't break the chain" mentality.  Hope you're along for the ride - I guess we'll see come every Tuesday and Sunday.

Cheers for now.