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.

Wednesday, June 29, 2011

Old Tools for a New Age

I like Command Line Interfaces alot.

I like them for their power, lack of mouse usage, and mostly their seemingly infinite learning curve. When I say this I mean that given an inifinite level of genius/craziness anything is possible within the CLI. This is good because it lets the hardcore folks really scale in efficiency as they see fit.

Whats about browsers?

They get no loving-embrace from the CLI. I've been thinking alot of what could be brought to the table. Here are some of those thoughts:

Silent+ Easy social media updating
social -tf "Loving this command line interface!"
Updates twitter and facebook with this new status

Ease of click heavy actions
bookmark -a \media\funny\cats
bookmark -m \media\funny\cats \media\awww
Adds the current page to your cats bookmarks folder
Moves all your cute cat videos to the new "aww folder"


Integration with email and other services
maps -d -t="200 university ave waterloo ontario" -f="169 charolette st port colborne ontario" > email -r=scott.tolksdorf@gmail.com -s="Directions to Home" -m="here are those directions"
Gets directions from the university to my house and sends them into an email to me. All from the command line.

I thinking something like a shortcut enabled drop down on the top right to the console. If I find some time I might start working on a chrome extension.

xo-skeleton: The hippiest way to save time while webDeving

I write alot of webpages. Alot. Most are just for fun side projects, a few clients here or there, or just some quick mock-ups. However, I seem to be writing the some code over, and over and over again. Figuring out the same annoying quirks of css. Still trying to get columns to work. Well I decided to fix all of that.

Introducing xo-skeletion! (xo for short)


So Clean. So Beautiful. Look at those columns!
xo-skeleton is a hyper-lightweight web framework. I tried a few other frameworks and they were super massive and took weeks to learn. So I built my own.
xo is simple!
Some of the features:
  • Easy html-class based access to common css sttributes (font size, color, etc.)
  • A simplifed way to make columns in html
  • Pre-built footers
  • Comes with 4 of my favourite fonts
  • Built-in Javascript debugging tool BlackBird.

Do you feel how easy that was?
Do you feel yourself getting more attractive to the opposite sex?
Yes. Yes you do.
Anyways, download it, give it a swing. Tell me what you think!

Sunday, June 12, 2011

Challenge Complete!

The Challenge is complete!

I had a few hiccups; being distracted by a movie and sleeping (bleh). All in all it was very fun. In total I took me about 150ish minutes of actual coding time.

Things I learned:

  • In challenges like this you really need to know your language. I unfortunately did not know python that well, which lead to some headaches and constant syntax look ups. I would have been better using lisp.
  • I really like recursion. I used it in every solution. Made my code super tiny! My longest solution was 30 lines long.
  • One of my friends who recently completed the challenge said there was "secret tech" to solving the first challenge super fast. I think that distracted me too much. Still don't know what it was, my solution runs in n^2 time, but usually better due to some tricks I added.
Give the challenge a shot!

Saturday, June 11, 2011

The Greplin Challenge

A friend of mine introduced me to a little coding game called The Greplin Challenge.

Let's see how quickly I can tackle this.

Friday, June 10, 2011

Deployed!

Whew! Time definitely flew. The newest version is deployed and running, so check it out!
Do you has what it takes?

Let's review
- Better distribution of question types  It now always does at least 5 of each question type
- Better instructions I think it looks pretty good
- Adding a count down timer before the test begins Just enough time to read the fancy instructions
- Clean up the interface a touch more Still has some more love to be given, but so far good
- Add a repeat button Aww yeah!
- Add an easily copy-able final score to share Wrote this in the last 5 minutes!
- Facebook and twitter sharing
- Graph of results


Lessons learned?
- CSS, as always and continues to be, a complete bitch. Ate up most of my time getting things to fit and not fly away the screen.
- Customizing the twitter and facebook share buttons is trickier then I thought. It'll need a tad more research.
- The transition between the countdown timer and experimenting needs a bit of work. I has some ideas.
- Rocking out in the same turntable.fm room as the Zuckerberg increases productivity. True Story.
- I have alot of progress for the graph, but not quite finished. 
- CSS is a bitch.


You may have noticed I changed the logo to "ReCognition:Math". This has been so fun, I think I'm going to build a whole suite of cognitive tests under the name ReCognition. 


Next ReCognition test?


Reaction!





Instructions are also cool

Is this instructiony enough?

Time to Buff

While sitting in class, the last post still fresh in my head, along with a ton of suggestions and improvements flowing in from friends, I really got ramped up to begin the polishing process ASAP.

Alright, so here's the run down:
- Better distribution of question types
- Better instructions
- Adding a count down timer before the test begins
- Clean up the interface a touch more
- Add a repeat button
- Add an easily copy-able final score to share
- Facebook and twitter sharing
- Graph of results

Alright, let's give myself... hm.... 90 minutes? I'll report back then and see how much I can cross off. GO GO GO!

Math is cool

Hello Internets,

A few days ago I embarked on a coding sprint. A coding sprint is where I pick a small project that I can complete in about 2 hours and time myself coding it. I like to do these about once every 2 weeks. The project for this fortnight is lovingly called Mathy.

Minimalism is the new cluttered


The inspiration for Mathy came from a need. Very soon I am going to be starting a nootropic regiment and wanted to get so base-line cognitive scores to test differetn stacks against, as any proper scientist would. So I thought, "I'll just look up a series of basic cognitive tests online, bookmark them and attack them each day. Easy Peasy Lemon Squeezy".

FALSE.

All of the tests I found were poorly designed, childish in nature, varied wildly in difficulty, length and configurability and finally riddled with ads. Being part of the Self Tracking Community I saw this as a definite vacuum. So Mathy is my contribution to make the world a more trackier place.

Mathy is simple. Answer 25 random math questions as fast as possible. The goal was clean and attractive interface, excellent analytics, and relative short length (takes about 30-60 seconds). It's built in about 200 lines of Javascript and hosted on App Engine.

Not too shabby.
It's a start, I'm going to add much more polish later, but for now I'm proud for what I can do in 2 hours. Enjoy!

Wednesday, May 18, 2011

The Beginning

Hey Internets,

For a while I've been wanting to do a bloggy thing, never had any topic stick. UNTIL NOW. This blog will be a microblog (expect posts under 200 words) around my coding sessions. My hope for this is 3 fold.

1) Provide a nice break from coding to objectively complain about problems/features I may have in actual words, rather it being stuck in my brain. In my experience this usually solves the problem instantly.
2) Easy way to share, and thus crowd source ideas, suggestions, and interest in some of my side projects.
3) A record for neat things I've figured out or blunders to avoid in the future. Not only for myself but for the whole internet! How neat!

Let's do this.