Thursday, April 24th 2014
I ordered a LoL Shield from Adafruit for my Arduino a while back. Just now getting around to playing with it. LoL stands for "Lots of LEDs." This shield just attached to the top of an Arduino. With the use of a special library I can program it to display all kinds of patterns or just text. I figured this would be a great project to learn how to solder better. The grid size is 9x14. That's over a 100 LEDs! I think after making 200+ solder joints I should be a pro right? We'll see. Above is my progress so far. It's been tricky to keep them all straight. It doesn't have to be perfect. It gets a little frustrating. I'm enjoying it. That's all that matters. If you're interesting in learning more about this project kit checkout http://jimmieprodgers.com/kits/lolshield/
Category: Arduino (4)
Tags: electronics, blue
Monday, April 21st 2014
Gift subscription services seem to be popping up everywhere. Over the last few months Heather and I have been looking at Loot Crate. If you don't know what Loot Crate is let me explain. Loot Crate is a gift subscription service for geeks! I love it. Basically you pay a monthly fee and they will send you a package full of great stuff. It's like a geeky Christmas package every month. The contents of the crate are definitely worth more than the monthly cost. Crates are sent out roughly around the 20th of the month.
So for Easter this year I decided to sign Heather up for Loot Crate. It worked out perfect! This month's theme was "Dragons." We love dragons by the way. :) With Easter being so close to Loot Crate ship day it actually arrived the day before. Great planning right?
So what's in it? Glad you ask. This month contained an exclusive Elder Scrolls Online Nord Foam Figure above. A d20 foam stress-ball dice. A regular random d20. A Game of Thrones foam figure. A Loot Crate button. A screen clear. Dragon Jerky (kinda green, but looks yummy!). A really neat magazine talking about all the contents. Plus some other interesting things.
Was it worth it. Ya bet ya! Catch ya next time.
Category: Loot Crate (1)
Tags: lootcrate, elder scrolls online, dragons
Wednesday, November 13th 2013
After working with different types of data for many years you gain appreciation for a few things. One of the odd things I've gain favor of is the ISO Date Format (YYYYMMDD). This simple concatenation of a four digit year (YYYY), 2 digit month (MM) and 2 digit day (DD) makes it very easy to query and work with. Not to mention this format is internationally recognized and compatible with gregorian and julian calendars. With or without built in programing/scripting language functions I can break this date format down into easy to use parts. Let me show you a few PHP snippets I've used in the past.
Example: Parsing ISO Date Format Using date() and strtotime() Functions
$str_date = 20131231;
$year = date("Y",strtotime($str_date));
$month = date("m"),strtotime($str_date));
$day = date("d"),strtotime($str_date));
Example: Parsing ISO Date Format Using substr() Function
$str_date = 20131231;
$year = substr($str_date,0,4);
$month = substr($str_date,4,2);
$day = substr($str_date,6,2);
Where I think this date format really shines is in SQL queries. Because of the nature of the date format being an integer it makes it easy to find all the dates between a range of dates. For example say if I wanted all records where the date is between January 1st 2013 and October 21st 2013. My query would look something like the example below.
SELECT * FROM records WHERE mydate BETWEEN 20130101 AND 20131021;
What if I needed a quick and dirty way of querying for all records during one month (April 2013) or even a full year (2013). My queries could look something like the examples below.
SELECT * FROM records WHERE mydate LIKE '201304%';
SELECT * FROM records WHERE mydate LIKE '2013%';
One last thing about this date format. How can we convert to it? Well Below are some examples in different languages. I hope this may have inspired you to take a look at this date format. I know it makes my life easier as a developer at times. In a future article I'll talk about the benefits of using Unix timestamps as well.
Category: Snippets (1)
Tags: development, php, mysql
Thursday, November 7th 2013
I've decided enough is enough. I'm tired of WordPress. I've decided to develop my own blog system. I've named my project SmallBlog. Right now it's basic. But you're looking at it and it works! It has a lot of the features I enjoyed about WordPress without all the issues. I haven't decided if I'm going to release my code open source or not. One of the things I don't like about WordPress is the fact everyone knows it's vulnerabilities. Because it is so popular it becomes a target of exploit. More to come!
Category: News (1)
Tags: development, News