Thursday, November 3, 2011

GRT API

It's been a while since I posted here. I've been busy looking for a job and being homeless and such. However I've come up with a little idea for a project while I was waiting for the bus the other day.

All the ways I have found to check for bus schedules in my city to be tedious and cumbersome. I like to fix bad systems, so while riding to my destination I started imaging a much better app that would allow people to quickly check bus times. The UI design and level of involvement seemed more then a quick app, especially when I wanted to release something for web and multiple mobile platforms. Then it hit me, why not build a simple web protocol to let all the other developers in my area have easy, query-able access to GRT data.

Enter GRT API.

I'll be building it quickly on Google App Engine. You send it specific URL queries and it'll return a JSON object of bus times. Let's take a look at options.

  • stop_id : specify a stop id to narrow the search down by
  • bus_name : specify a certain bus
  • stop_time, start_time : A stopping and starting time to look for
  • num_results : the max number of results you want per bus
  • gpslog, gpslat, gpsrange : provide it with your gps data plus a range and it'll limit the results.
So what will this return? A JSON objects of stops, which contains an array of buses, with an array of times.

First step? Let's get that data!


UPDATE 1:
First thing I wanted to add to this is different URLs the developer can go to to get lists of certain bits of data. Like a list of all the bus names, or a list of all stops with geodata, id, and addresses. Could be fun.

UPDATE 2:
Switching over to Java as the appengine backend code. Good news! I found that all the grt schedules are open to the public. Unfortunately it's in a zip with text files. I'm probably going to write a quick C# app that'll tear the zip apart and rebuild the data I need into an easily uploaded txt. Quick fix for now, I'll look into possibilities where the server itself could parse out this data. I'm switching my work over to the java environment, then running off the campus for a few hours. Continue it after then.

Tuesday, September 6, 2011

I am in my element?

So I only got about 3-4 solid hours to work on this yesterday. Between the back to the future marathon, a long call from my dad and helping my mom make dinner, the project got seriously derailed.

Coming back today with new vigor. I'm approaching the design and data flow of this project in a weird way, we'll see if it turns out. I'll go into full detail when I know if it'll help or hinder.

CODE TIME

Monday, September 5, 2011

10,101 Pushups

Quick update.

Alright, basic skeleton is done. Page changing animations in. Basic accounts are working.

Next up: Building the database, adding in some sample workouts, and running through a workout. After that program in the "boss battles", exiting out of a workout.

First a quick stretch and read a few chapters outside. Be back soon!

10,000% more pushups!

Hello citizens of the internet!

Welcome to Labor day! Because of this cold and overcast holiday I decided to do another coding sprint, but this time with more pushups. I'm a little late starting today seeing as I was struck by a sudden and unavoidable Back to the Future marathon, but now I'm all jazzed! To coding!

If you haven't heard of 100pushups.com you should definitely check it out. Its a very simple and effective way to get fit, with the ultimate goal of doing 100 consecutive push-ups.

Sounds impossible? Only mildly.

The program has a nice progression to it. Last time I did it I got to 83 consecutive push-ups in about 2 months!

Anydangway, the site isn't great. They over monetized it with ads everywhere, and much of the information hidden between links to other affiliates. Even when you do find what the program is all about it, basically turns out to be a spreadsheet. They do have some mobile apps, but even those are poorly designed and costly, focusing on basically every other aspect of this program, but that of ease and progression.

So, in one day, I'm going to build a better site. The plan is to have users be able to track their progress, have the site help them with their workout (timing when to take breaks, etc.) and have a very clean and elegant interface. Due to copyrights I'm changing the program to stray from 100pushups and have a more RPG feel of leveling up.

Okay, enough talking, lots to do!
- Get google accounts working on App engine to automatically log in
- Have custom content display per user on login
- Build an elegant login/logout progress
- Lunch/dinner?
-  Start building the basic workout procedure
- Create skeleton of the account page
-  Umm more cool junk
- Jquery the shit out of the timer and procedure
- Yeah yeah Yeah!

Friday, July 8, 2011

Why I (accidentally) make life hard.

Today I've noticed a trend. Each term since first year, there's a time where I just stop doing anything school related. Is this because I have things on the go? Maybe, but I always have a busy life. Is it because it's too hard? Not really. Is it because the material is boring? Nope. So why do I do this?

I asked this question today, as I came to class for the first time in 1.5 weeks. Everything was exciting, fresh and new. I was behind in material and loved it. As the prof drew new formulas and equations on the board my mind lit up with connections that weren't fed to me, postulating how this related to earlier concepts with being explicitly told, quickly flipping through the text needing to extract information missed lectures in minutes to keep up. It was a total rush; It was fun.

Apparently, I self-handicap. I intentionality make life harder for me. After walking through a number of varying situations in the past where I have done this I narrowed it down to 3 reasons:

  1. It's fun to be in the fray. Anyone who has been in a hackathon knows how addictive the time constraint can be. The panic, the spurts of creativity, quickly overcoming obstacles and finally squeezing everything in last minute is intoxicating. I feel the same way about everything. So when I hit a lecture and all the material is new and exciting and it's tricky to keep up, it's amazing. If I go to every lecture, I don't feel challenged, it's like playing on easy mode. I just feel like a dumb sponge absorbing the concept sand spitting them back out verbatim. 
  2. When I fail it gives me an excuse to save my ego. I consider myself a smart guy. When my actions, like getting a 40% on a test, tell me otherwise, I get a lot of cognitive dissonance going on (this is when the brain gets mismatched information, fun fact: the brain HATES this, most weird psychological behaviors can be attributed to attempting to resolve cognitive dissonance). However if I can tell myself "Oh you did well for only giving yourself 3 hours to study", BAM! Dissonance gone, and , in my eyes, I'm still a smart guy.
  3. When I succeed it gives me an excuse to brag. I've never been one to play life normally. I love telling and creating stories. So, playing by the book, studying all weekend, and getting the standard 80-90% on the midterm is normal. If I told someone that they would be like "Well, of course you did... that's how it works." However, if I studied for only 4 hours, and had to reverse engineer a theorem during the midterm, and came up with a crazy way to solve question 3 because I didn't memorize the procedure, and only got 60%, I am more proud of that 60 then a well studied, easy-to-get 80.
So, how can I use this realization as a new tool to be better in school? No idea. It's a shame it took my 4 years to really understand this about me, just as I'm on my way out.

Wednesday, July 6, 2011

Building a Hacker's Deck

Everyone seems to have a pretty definite opinion on the choice between Desktop or Laptop. I've fallen into the former category mostly due to my love of screen realestate. However, I tend to participate in a fair number of hackathons, code-jams, and the like, the usual protocol is either alone in my room, or lugging my not-so-dainty system around.

My experience with doing development in a laptop has not been great. A combination of being incredibly picky over interface devices, and being incredibly used to 2.5 screens (I have a small 10 inch screen complementing my duals), I found the process cramped and over all unsatisfactory.

Enter the Mobile Desktop.


I've been dying to design and build something in the middle. A computer which is portable, but it's design isn't bound to certain keyboards and screens. Here's my wish list:

  • Small form factor. Something approaching the Asus EeeBox
  • Hard drive space is largely irrelevant. Anything over 30 gigs should be good
  • Lots of RAM. At least 4gig, hoping for 8gig
  • At least a Dual Core 2.5ghz
  • 4 USB ports, but something in the realm of 6-8 would be fantastic
  • I would like to have support for two screens, but I think that's a pipe dream
  • Integrated Wireless would be nice, but I have a nexus1 for that;)
  • Lastly, I want to integrate a small battery into the device. Something allowing for 20-60minutes of run time. This will allow me to move the device around without worry of it turning off. This might be tricky, but really worth the extra effort.
  • Budget? Under $500
My two approaches I'm thinking of is either buying an EeeBox, gutting it, and adding on the additional parts. The second approach is to simple build it from scratch. This is more favorable simply because I can avoid the Atom processor which is meant for long battery life, which I have no need for. However obtaining a good case to fit this weird computer might be tricky.

If you have any tips or part suggestions, I 'm all ears!

Monday, July 4, 2011

Noodles!

One of my friends, Ross Robinson, is working on an interesting little side project. A nifty http request based external database. He calls it NoodleDB.


What's really interesting about it is that it allows for completely client-side applications, while still providing a place to store all your data. The main purpose of the project is to provide a service for very quick prototyping, letting you push and retrieve arbitrary JSON objects just by http request. I'm alittle bit in love with this idea, seeing as I hate setting up databases and all those finicky things.

I spent alot of time working out how to do asynchronous database connections between app engine and javascript while working on Omnomnom, and I think I'm going to wrap that up into a library that'll plug right into NoodleDB.

Ross is mainly focusing on the server-side API end of it. In inspiration of my work with Xo-Skeleton I'm going to be building a javascript library called xo-noodle.js. I'm thinking for having three commands:


xo-noodle.setup("database url");
xo-noodle.save("json object", [optional:extension url], [optional:html img id]);
xo-noodle.query("query", "callback function", [optional:extension url], [optional:html img id]);

///Example
xo-noodle.setup("yousite.com/db");
xo-noodle.save("data","/user");
xo-noodle.query("query", "displayItem()", "/item");


Setup sets up xo-noodle to point to a certain location.
Save pushes a json object to the location provided by setup, as well as pointing it to any sub url provided. IF you also include a html img tag id, it will populate it with a loading gif and a success gif on finish as well.
Query sends a query to the location provided, pushing the result to the provided function. The optional parameters work the same as Saving.

I'll be fleshing out the first version shortly and iterate from there.