Sign in or Join FriendFeed
FriendFeed is the easiest way to share online. Learn more »
Everybody Loves CSVs - http://jon.smajda.com/2013...
Clients love CSV files. Well, clients love Excel, and if you give the option of either importing or exporting data in a format Excel can handle, they will take it. So I end up fighting with CSV files quite a bit. On the output side, I put together a Django package that makes creating CSV views easy. On the input side, I was playing around with importing a bunch of data from CSV files and, inspired by a couple of talks I recently watched on pyvideo.org, I realized I could put together some handy re-usable helper functions for importing csv data. I just included the result in my django helper collection because it should be useful in a lot of projects. The basic idea is to write a generator that looks at a CSV, figures out what the headers are from the first row, and creates a Row named tuple with appropriately named keys. It then simply yields a new Row instance for each row in the csv. The cool thing about this is that you can then access items in your row by name instead of by index,... - Jon Smajda
Picture of @jacobian making Django while I tweak colors on my text editor or something. #djangosprint http://www.meetup.com/pythonk...
RT @jbouie: Oklahoma, of all places, is a model for universal pre-K. @fastlerner wrote about it for @theprospect: http://prospect.org/article...
Watching videos of @orianthi shredding with my daughter. She decided she wants a red PRS someday.
That's it: I'm only doing static sites from now on: http://www.kalzumeus.com/2013...
Did a PHP + Javascript project this week & realized I’m actually more comfortable with Javascript than PHP anymore.
RT @LoogGuitars: Love this really fair review of the Loog Guitar by @smajda - plus his daughter rocking out is adorable! http://jon.smajda.com/2013...
Loog Guitar Review - http://jon.smajda.com/2013...
My 6 year old daughter’s big Christmas gift this year was a Loog guitar. Before ordering it, I had considered whether or not to buy one for months. For one thing, I had a hard time finding actual guitarists reviewing the Loog as a guitar. All the reviews were positive, but lacked depth. After a week with the Loog, I figure I may be able to help others in similar situations. In short, I have some complaints and cautionary notes, but in general I love this little guitar. My daughter’s having a blast with it so far, and so am I. My daughter already had a toy guitar, and it was terrible. It was an acoustic with six steel strings a mile off the fretboard that were impossible to tune. It was exactly like all the toy guitars you’ll see in the toy aisle, and these exist solely so that little kids can strum out-of-tune open chords, pretending to be rock stars while annoying everyone within earshot. This is no way to introduce anyone to actual guitar playing. The promise of the Loog is that it... - Jon Smajda
Tidier Model Methods - http://jon.smajda.com/2012...
A common problem with Django models is that your Model’s methods become unwieldy. Dozens of methods tacked on to your Model are handy and all, but: Your models.py file becomes a big mess. Your Model’s namespace gets cluttered and it’s hard to tell what’s what. One technique I’ve become fond of for keeping these organized is to organize these methods into separate classes and then use composition to attach these classes to either an instance or a class. Here’s a simple example that should give you the idea: let’s say you’ve got a Person model and you have a bunch of methods that apply different formatting to information about this person. You can take all of those formatting-related methods, put them in a class, and then attach them to each Person instance at self.formatters using object composition on the instance: class Person(models.Model): name = models.TextField() title = models.TextField() address = models.ForeignKey(Address) # etc. def __init__(self, *args, **kwargs):... - Jon Smajda
One of my absolute favorite things about Python is the rich collection of data containers you have at your disposal: lists, dictionaries, and tuples, of course, but also the collections module (OrderedDicts, namedtuples, Counters) and the topic of this post: sets. You see, if you’re coming from PHP, there are arrays. And then there are arrays within arrays. You can have any data structure you like, so long as it starts with array(. You know, array(array(array(array(.... So, coming from the impoverished data structures of PHP, Python’s seem both luxurious and overwhelming. Sets, for instance, didn’t make much sense to me at first. Sets are like lists, only they’re unordered and can’t contain duplicates. Those sound like handy features to have — I think I’ll just use lists! And when lists are needed, use lists. But there are actually many common situations where people often just use lists when sets can solve a lot of problems. Set Operations Let’s say you’re validating a CSV file. You... - Jon Smajda
In one form or another, this blog has existed since 2003. On the eve of 2013, however, I find I’ve not really been using much for a few years now. Much of the reason for my recent silence is pretty simple: I’ve been really busy, and my life has been in flux the last few years. A few years ago, I was a graduate student in sociology with hopes of an academic career. Now I’ve got a PhD in sociology but I’m knee deep in a young career not as an academic, but as a web developer. I’m quite happy with how this has turned out actually, but it’s also meant a hectic few years of playing catch up. I’ve always used this blog as a knowledge dump for whatever I’ve been learning, but I’ve done virtually none of this in recent years. I’m going to try to change this. These days I’m writing a lot of Python and building websites and web apps with the Django web framework. I’ve been lucky enough to work at small companies where I’ve gotten a chance to work at pretty much every level of the development... - Jon Smajda
Anybody else ever have their iPhone delete all their music all of the sudden? http://twitter.com/smajda...
RT @mattyglesias: You should move to Minneapolis: http://www.slate.com/blogs...
Does AirPlay mirroring from Mountain Lion to AppleTV ever do this for anyone else? http://twitter.com/smajda...
Siri almost sent a text to someone I haven’t talked to in years that said “No cancel”
Was planning on getting back into some overdue PHP work this morning, but then I saw the DjangoCon 2012 videos are now available.
RT @monkeycageblog: Why News Coverage of the Debate May Matter More than the Debate http://themonkeycage.org/blog...
UDP/IP Addresses - U.S. Equity Market Data Feeds - http://www.nasdaqtrader.com/Trader...
#1 Canon PowerShot ELPH 300 HS 12.1 MP Digital Camera (Black) Best Deal - http://dealplusb.com/?p=450
Best Buy #1 Cheap price Canon PowerShot ELPH 300 HS 12.1 MP Digital Camera (Black) Lowprice Onsale,Cheap - Jon Smajda
** LOVEPET Dog Holliday Bow Tie Collar, Wedding Collar, 7" - 17", 10 Colors Best Price - http://onlinearkansa21.insanej...
Best Buy ** LOVEPET Dog Holliday Bow Tie Collar, Wedding Collar, 7" - 17", 10 Colors Best Price Lowprice Onsale,Cheap - Jon Smajda
$$ Summer Infant 2 Count Swaddleme Blanket, Woodland Friends, Large Best Price - http://onlineshoppin43.insanej...
Best Buy $$ Summer Infant 2 Count Swaddleme Blanket, Woodland Friends, Large Best Price Lowprice Onsale,Cheap - Jon Smajda
@ Breville RM-BJE510XL Certified Remanufactured 900-Watt Variable-Speed Juice Extractor Best Buy Chaap - http://0germantown13.livejournal.com/73568...
Best Buy @ Breville RM-BJE510XL Certified Remanufactured 900-Watt Variable-Speed Juice Extractor Best Buy Chaap Lowprice Onsale,Cheap - Jon Smajda
# Reviews 1pc Free Shipping Deluxe Blue 3-part Hard/Skin Case Cover For Ipod Touch 4 4G 4th Gen - http://0gibsonisland2.livejournal.com/70217...
Best Buy # Reviews 1pc Free Shipping Deluxe Blue 3-part Hard/Skin Case Cover For Ipod Touch 4 4G 4th Gen Lowprice Onsale,Cheap - Jon Smajda
{!|#|@|#1|#2|#3|$$|**|#!*1} {where can I find Roku 2 XD Streaming Player 1080p | where to buy Roku 2 XD Streaming Player 1080p | How Do I Roku 2 XD Streaming Player 1080p | How to fix Roku 2 XD Streaming Player 1080p | get the best price for Roku 2 - http://blackfridaydealblog.info/...
Best Buy {!|#|@|#1|#2|#3|$$|**|#!*1} {where can I find Roku 2 XD Streaming Player 1080p | where to buy Roku 2 XD Streaming Player 1080p | How Do I Roku 2 XD Streaming Player 1080p | How to fix Roku 2 XD Streaming Player 1080p | get the best price for Roku 2 XD Streaming Player 1080p | How to remove Roku 2 XD Streaming Player 1080p | How to quit Roku 2 XD Streaming Player 1080p | Roku 2 XD Streaming Player 1080p Economy size | Roku 2 XD Streaming Player 1080p best price | who sells Roku 2 XD Streaming Player 1080p the cheapest | Roku 2 XD Streaming Player 1080p Industrial size | who sells the cheapest Roku 2 XD Streaming Player 1080p on line | Roku 2 XD Streaming Player 1080p compare prices | price comparisons Roku 2 XD Streaming Player 1080p | price comparisons of Roku 2 XD Streaming Player 1080p | Roku 2 XD Streaming Player 1080p with paypal | Roku 2 XD Streaming Player 1080p under $50 | Roku 2 XD Streaming Player 1080p Coupon Codes | How do you Roku 2 XD Streaming Player 1080p |... - Jon Smajda
** Anker® SlimTalk 3200mAh Backup External Battery Pack Charger with Embedded Micro-USB and Flashlight for iPhone 4 4S 3GS 3G, iPod Touch Classic Nano; Android Phones: Samsung Galaxy S3 SIII I9300, Galaxy S2 S II I9100, Galaxy Nexus, Galaxy Note / - http://0girdletree17.livejournal.com/68678...
Best Buy ** Anker® SlimTalk 3200mAh Backup External Battery Pack Charger with Embedded Micro-USB and Flashlight for iPhone 4 4S 3GS 3G, iPod Touch Classic Nano; Android Phones: Samsung Galaxy S3 SIII I9300, Galaxy S2 S II I9100, Galaxy Nexus, Galaxy Note / HTC One X One S Sensation, EVO, ThunderBolt / Motorola Droid Razr / Nokia N9 Lumia 800 900 - White [Ultra Slim 0.4 Inch Profile] Best Price Lowprice Onsale,Cheap - Jon Smajda
#3 Victorinox Swiss Army 3-1/4-Inch Fibrox Straight Edge Paring Knife, Black Best Buy - http://bestwyoming54.insanejournal.com/60588...
Best Buy #3 Victorinox Swiss Army 3-1/4-Inch Fibrox Straight Edge Paring Knife, Black Best Buy Lowprice Onsale,Cheap - Jon Smajda
#2 The Amateur Best Buy - http://bestsellermic98.insanej...
Best Buy #2 The Amateur Best Buy Lowprice Onsale,Cheap - Jon Smajda
! Canon PowerShot SX150 IS 14.1 MP Digital Camera with 12x Wide-Angle Optical Image Stabilized Zoom with 3.0-Inch LCD (Black) Best Buy - http://dealsblog.us/?p=968
Best Buy # Canon PowerShot SX150 IS 14.1 MP Digital Camera with 12x Wide-Angle Optical Image Stabilized Zoom with 3.0-Inch LCD (Black) Best Buy Lowprice Onsale,Cheap - Jon Smajda
Waiting to see my new eye doctor, Dr. Carter. Hoping to get my weak eyes, and my weak flow, checked out.
Emailed four sociologists this morning, got four vacation emails right back. Is something going on right now? #ASA2012
Other ways to read this feed:Feed readerFacebook