Thursday, August 23, 2012

Edge.py server

Here is a small pure 2.6+ implementation of a simple restful server i write about 5 months ago
it uses just the built-in socket librairy

and a small test that shows an example on how it can be used

ofcourse i have no documentation written but its very simple to understand
you navigate to 

doing so shows all the values you entered..its kinda like a key:val store

The problem with stackoverflow


Sometimes the people who are there to help
often get carried away and think its important
to moderate HOW you ask your question more than
helping you actually answer your question

Sometimes it works other times it just leaves you feeling
bad like the community is only helping to get points,
or to get reputation.

And im sure they have some excellent people solving problems
and they have a very high score because of it.
It may just be me, but it seems everytime I see a
question on stackoverflow. An answer is nowhere to be found
instead a bunch of people griping over the format of the post.

Or i see questions that don't really fall into a category, more of
a discussion and these sometimes are very VALID conversations
that are closed because they are not QUESTIONS...
it's things like this, that make me think twice before consorting with
stackoverflow.com

your $0.02 is very welcome.

Wednesday, August 22, 2012

The digital tv


Does anyone else notice that we are pretty much slaves to the t.v channel schedules ,If a show comes on that you cant watch because of when it comes on or what channel it comes on you have a few choices

  • find the correct time to watch it or 
  • record it later
  • find it online


but what if the television actually acted like it was manufactured in the 21st
century....where is the dynamic broadcasts?
where is the create my own channel?
how about t.v API's?
nothing its like everyone has forgotten about the boobtube.


Am i the only one who looks at a tv and sees a possiblity of endless creativity

so for example lets say you want to watch cartoons but its 4am and they are no cartoons at 4am
wouldnt it be so nice if i could ask the channel directly for certain cartoons.
and maybe create a small channel based off the cartoons that were on the previous day or maybe even
the next day. even search for a cartoon that aired a few days ago that you missed.

i mean think about this do you watch a channel or a show...for me its mostly the show
you dont turn on the t.v and say "i wonder whats on USA or SyFi"
no you flip through the channels or a guide hopeing to find something to catch your interest
and if you see something you like your stuck on that channel.

sure tvs of today have app and web connectivity...but its just another computer.
theres nothing innovative about it...at all

and yes we do have websites like netflix and hulu that offer whole shows you can watch
on your computer or stream to your t.v but like I said its just another computer

ScraperWiki

Scraping is considered by most a devious or malicious art that is only for those who wish to steal data, However this is not true, the problem is most websites offer great data however lack a real nice way of getting just the data. Some of the websites offer an api but most dont so what can you do?

Well you could manually visit each website and extract the data yourself...OR  you could write a program todo it for you maybe in something like pthon or maybe php even javascript and that would be all fine and dandy OR you could have the cloud scrape for you...Enter Scraperwiki.

One of the best scraper services on the web allowing you to leverage python, ruby and even php to write scrapers that you can manage and run when you need it or let it run daily so you have the latest data

Either way you spin it if you want to scrape some data and want a great online
service to manage it look no further then Scraperwiki

Want a small example?


The only thing you need to worry about is choosing which library your going to use
for python you can choose from
and ruby offers

and php offers only a few

all languages implement a library called Scraperwiki that expose a number of functions that will also help you. 

Ill admit when I started writing this post I only knew of a few of these features and they have alot more...more then I can explain just head on over and start grabbing data today.

Reddit Link grabber

Here is a small script I wrote to extract links from reddit its not bullet-proof but the point was to avoid regular expression
and rely on CSS Selectors. I also chose to use Sizzle because it gives the power of jquerys selectors minus all the stuff we dont need