Sign in or Join FriendFeed
FriendFeed is the easiest way to share online. Learn more »
RT @Mailbox: @vroy @smajda This is disabled in our forthcoming iOS update (v. 2.3.3). It was exploratory on iOS only, & we believe reverting back... 1/2
RT @vroy: @smajda @Mailbox I wrote a piece about App Links recently too.
Mailbox and Facebook App Links -
Everyone knows passwords are terrible, so I’ve been using django-nopassword to enable password-less logins on a handful of Django sites I’ve built. The technique is simple enough: you provide only your email address and a link is sent to that email address. You click the link, which contains a special login code, and the website logs you in and deactivates the code so it can no longer be used. Subsequent visits to that URL just give a 404. In other words, every login is treated like a password reset. For many use cases, this could be a real pain, but for the case of, say, a site where a handful of internal users need access to an admin panel, it’s really nice to not have to deal with one more password. A few weeks back, however, I discovered my login attempts weren’t working when I used Mailbox on my iPad. I’d click the link, Safari would open, and I’d get a 404. Click the link from instead? No problem. What’s going on with Mailbox? So I looked at my server logs:... - Jon Smajda
Anybody else now just instinctively get nervous every evening around this time for #Fergurson? Can’t imagine what it’s like for residents.
RT @jbouie: Probably a good time to share this. Give the police military weapons, and they act like an occupying force.
Another great Python talk by @brandon_rhodes: While you're at it, just watch all of them:
RT @greghoward88: new post: America Is Not For Black People
RT @voxdotcom: The very real impact of Obamacare opposition:
RT @PythonKC: Update: today @Hedonistica will discuss #Git and @smajda will discuss @docker at #PythonKC. 7pm at @AlightAnalytics.
RT @Ihnatko: Today's TSA lesson: a _frozen_ bottle of water (in my bag to keep my sandwich cold) was ruled an "ice pack" and could go through.
It’s a good thing these come in two packs. One of these was just purchased today:
Hospital in the rearview, finally.
Everybody Loves CSVs -
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, 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
RT @jbouie: Oklahoma, of all places, is a model for universal pre-K. @fastlerner wrote about it for @theprospect:
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:
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!
Loog Guitar Review -
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 -
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 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?
RT @mattyglesias: You should move to Minneapolis:
Does AirPlay mirroring from Mountain Lion to AppleTV ever do this for anyone else?
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
UDP/IP Addresses - U.S. Equity Market Data Feeds -
Other ways to read this feed:Feed readerFacebook