PhotoNotes

January 17th, 2010 by Takaitra

My next coding side-project is another WordPress plugin. After posting some photos of my breadboard, I decided it would be nice to have a way to add notes to those photos. The current solution is Mbedr which I’m not happy with because it requires that the photos be hosted on Flickr and makes a call to Mbedr’s web server.

Take a look at the PhotoNotes project page to see my progress so far. It’s not yet saving any changes to the database but having some working display code means that I’m half way there.

Projects , ,

Enhance WordPress wp_list_authors Template Tag

January 2nd, 2010 by Takaitra

As can be seen by some of the comments left on the site, a couple of frequently requested features cannot be added to the List Authors widget because they are not supported by the underlying wp_list_authors template tag. The WordPress code for wp_list_authors needs to be changed to enable these new features.

Feature 1: Allow an upper limit to the number of authors listed. Some WordPress sites have hundreds or even thousands of contributors. wp_list_authors currently would list all of them and, worse, execute an SQL statement for each author. The proposed fix could be a non-negative integer option named “count_limit.”

Feature 2: Allow sorting of the author list. This could be an option named “sort_by” with the values “name” and “post_count.”

Today I submitted a patch to WordPress Trac including both of the above features. It also changes the code to use a JOIN statement to get the author post count instead of running an SQL statement for every author. This was a necessity to prevent inconsistencies when applying the LIMIT and ORDER BY. One of the core developers is reviewing it now and, if I’m lucky, the change will be included in the next major release (version 3.0). If that happens, you can be sure I will be updating the List Authors widget to make use of the new options.

A less frequent request but one I’ve seen is for an “exclude” option with the ability to filter out certain categories of authors. There is a separate ticket for this and I might consider submitting a patch for this next.

Projects , ,

Breadboarding an Alarm Clock

December 2nd, 2009 by Takaitra

LCD Clock on Breadboard
I actually started this a couple of months back, but now that I have something working to the point where I’m pretty excited about it, I’m ready to share my pet project. Back in college, one of my favorite classes was my small electronics class. Learning about half-adders and resistors was okay but the really fun part was using embedded programming to interface a micro-controller to the outside world. Ever since then, I’ve wanted to build some sort of embedded project of my own. I finally motivated myself to build something I’ve always wanted–an alarm clock that works the way I want it to.

Here are the features of my ideal alarm clock:

  • Accurate to within a minute per month. Even better would be to synchronize to some time source.
  • Shows date, time and day of the week (so after a rough night, I know for sure if it’s a workday or not =D )
  • Easily visible during the day and at night.
  • Time adjustment allows adding or subtracting hours and minutes. I hate missing the correct minute on my current alarm clock and having to hit the set button 59 more times.
  • Alarm can be enabled/disabled according to the day of the week. Do I need an alarm on weekends? No. Am I so lazy that I don’t want to turn the alarm on and off every weekend? Yes.

Here are the items needed for breadboarding. This will be slightly different than the final bill of materials for the finished clock due to the breadboard power supply.

Note on LCD display: I purchased my display off of Ebay for $5 and it works great. If you decide to use SparkFun’s display, keep in mind that it requires a resistor in series when you supply power to the backlight. The resistor is not included in my schematic because my display has the resistor built in.

LCD Clock Breadboard

The notes on the image should give you an idea of what the components look like and what they are for. You will need to study the schematic to hook everything up correctly. If you are feeling lost at this point, read through the first two SparkFun tutorials then stop back. They will walk you through setting up the breadboard’s power supply and loading code onto an ATmega168.

LCD Clock Schematic

LCD Clock Schematic

If you’ve gotten this far, you’re probably interested in the code behind the alarm clock. It is available here. Keep in mind this is not a finished product yet so there are still some features missing. The RTC (real time clock) code is fairly solid though.

I already have a PCB layout ready in Eagle which I’m going to send out to get printed. I’m really looking forward to migrating from the breadboard to the finished product. I’ll make sure to post the result!

Projects , , ,

Happy First Birthday Natalie!

October 10th, 2009 by Takaitra

Happy birthday Natalie! I can’t believe our little person is already one year old.

Happy First Birthday! Cake Natalie's Family

Daily Journal, Natalie

Computer, 2001-2009

July 8th, 2009 by Takaitra

I finally got around to recycling some of the old electronics sitting in my closet by bringing them to the Hennepin County recycling center. I thought I was going to cry when they threw (literally, I’ve never seen a desktop computer fly so far) my old computer to the back of the huge container of TVs, stereos, and monitors. It was utterly worthless but I had a lot of memories attached to that aluminum box–namely LAN parties and college dorm life.

It gave me a lot of grief with 3 blown mobos and 1 dead powersupply over its lifespan. It was built during the height of the “modding” craze if you remember that. I made sure my box was rocking with a side window complete with a custom fan grill and blue cathode lights. No one could top my built-in car cigarette lighter, proudly installed in the spare 5.5″ bay. This is the one piece I kept. Maybe someday it will see new life in a desktop of mine.

Goodbye computer. If I had space in my closet, you wouldn’t be shredded and melted for scrap metal.

Daily Journal ,

4th of July Weekend

July 7th, 2009 by Takaitra

Toso Paparazzi Natalie's Tinfoil Hat 1

On Thursday night Tally and I dropped Natalie off at a friend’s and headed over to the Taste of Minnesota. As far as I can remember, it’s my first time there. I always imagined there were fun and interesting foods to try there. I was a little disappointed to find, after finding parking, a long walk, waiting in line for food tickets and a wristband, and waiting in line for food that all they had to offer was Grainbelt Premium, corndogs, and other fried fare. I don’t think any of it except for the giant freezies cost less than $5.

The music almost made up for this all–I enjoyed Chevelle back in college and Tally was also excited about Staind. I got there as the band had already started but was in time to hear “The Red” so I was happy.

We woke up early to drive out to Annandale for my family reunion which is held over 4th of July weekend. As always, it was a good to see the extended family. Someone had the idea to have a canoe war this year. I’m proud to say my cousin Erik and my canoe was one of the few to still be afloat after everything was said and done. Some at the reunion were meeting Natalie for the first time and everyone loved holding her. Perry and a few others witnessed her crawl for the first time down a small hill by the lake. She has been scooting along for a week but this was the first time she did it on hand and knees.

Daily Journal , , ,

List Authors 1.2 Released

July 6th, 2009 by Takaitra

List Authors 1.2 is released and includes a complete rewrite to work with the new WordPress 2.8 class-based widget API. Visit the project page to view the changelog or jump straight to the WordPress site to download.

Projects , ,

Recaptcha for phpBB3

June 28th, 2009 by Takaitra

Over the last year, I have had significant issues with spam on the phpBB3 forums that I administer. The recent blog post over at the phpBB site confirmed two things I already suspected: first that I am not alone in my spam problem and second that there is no easy way to replace the default captcha to prevent this spam. Upcoming version 3.0.6 of phpBB aims to solve both of these problems by providing a multi-purpose API to interface with any challenge-response including but no longer limited to captchas. For anyone using an earlier release of phpBB3, here is how I was able to get reCAPTCHA working. This completely eliminated the spam problem on my forums.

  1. Register reCAPTCHA keys for your forum domain at http://recaptcha.net/.
  2. Install bzr, Bazaar version control.
  3. get phpbb3-recaptcha experimental branch. (bzr branch lp:phpbb3-recaptcha)
  4. In a web broswer, browse to the phpbb3-recaptcha folder and open info.xml. A page will open with patch instructions. Follow the instructions, including for the language and style files. I found using rsync locally was helpful when copying the mod files to my phpBB installation instead of copying each file one by one.
  5. Browse to the /install/index.php page of your forum in a web browser, click on the recaptcha tab and click install. Then, go to the admin control panel and click on reCAPTCHA under Board Configuration. Here you need to input your public and private reCAPTCHA keys you obtained in step 1. Enable reCAPTCHA and click save. New users will now need to solve a reCAPTCHA to register on your forum.

Note for phpBB 3.0.5

I found I had to modify the patch instructions slightly for version 3.0.5 of phpBB. In file /includes/ucp/ucp_register.php the code

‘confirm_code’ => (($config['recaptcha']) ? array(’string’, false, 0, 100) : array(’string’, !$config['enable_confirm'], 5, 8)),

should instead be

‘confirm_code’ => (($config['recaptcha']) ? array(’string’, false, 0, 100) : array(’string’, !$config['enable_confirm'], CAPTCHA_MIN_CHARS, CAPTCHA_MAX_CHARS)),

How-To's , ,

Natalie Update

June 11th, 2009 by Takaitra

Pool Time  

Tuesday – I couldn’t find my wallet and cell phone in my work pants. I had draped them over the side of the baby crib which I sometimes do before I hang them up. After a quick look around the apartment, I called my phone. I found that Natalie had stolen it out of its pocket!

Thursday – Natalie can now crawl slowly…backward. It was really frustrating for her to try to crawl to mommy and daddy only to keep scooting further and further away.

Also on Tuesday, Tally and I dressed up and headed to The W Hotel which was hosting a free cocktail event hosted by (rī)1 whiskey. We didn’t know anyone there of course but I loved the free drinks and food. As it was an invite-only event, I also had a perverse pleasure in being “on the list.” That probably sounds childish but I had fun feeling special for a night.

Uncategorized

Birthday Week

June 7th, 2009 by Takaitra

I am now a quarter century old. Before I know it, I’ll be 30 and life will be basically over! I’m kidding, I know I’m still young but hitting a milestone like this definitely makes me think about how I got to where I am and wonder about what lies ahead. On Wednesday, Tally, Natalie, me and some friends spent the evening at The Happy Gnome. It was great to see everyone and I think they enjoyed getting to hold Natalie. On Saturday, a few of us headed to the warehouse district for some dancing. Overall, it was a busy but fun week. My thanks go out to my sweetheart Tally who planned it all (although I am bummed I never saw my balloon ;-) .

Natalie’s little personality is starting to show more every day. Some firsts of the last few weeks is that she got her first tooth and went swimming at the pool. She has a baby walker both at our apartment and at my parents and she loves pushing herself around in them. This coming Wednesday, she’ll be 8 months old.

Daily Journal, Natalie