-
posts
-
Working overtime makes you stupid?
There was a recent article I read online about how working working over 40 hours a week makes you less productive. http://www.inc.com/margaret-heffernan/the-truth-about-sleep-and-productivity.html I’m really really skeptical about over-reaching claims that say you shouldn’t work over 40 hours a week or you should spend 8 hours sleeping. While I think sleeping is important and can be debilitating, I still have a hard time believing that there is some magical number of hours that you can work per day or per week. Too much work or not enough sleep? I don’t think not working overtime makes you stupid. Perhaps working all night...
-
Python Sets
I had an application with two lists of unique items that I wanted to take the intersection of. I had figured that using a python set would be faster but I didn’t realize that it would be faster than the simple list comprehension by this much. ~$ python -m timeit -n 1000 "range1500=range(500, 1500);[x for x in range(1000) if x in range1500]" 1000 loops, best of 3: 18.2 msec per loop ~$ python -m timeit -n 1000 "set(range(1000)).intersection(range(500, 1500))" 1000 loops, best of 3: 120 usec per loop It’s about 150 times faster (notice the difference in order of magnitude,...
-
PyCon JP 2011 was Awesome!
On Saturday we held our first PyCon JP 2011. We had approximately 230 people show up which I think is great for a first time Python conference in Japan. I want to thank all the members of the planning committee, staff, and attendees for such a wonderful event. I had so much fun! The Python community in Japan is growing but has not been very organized so it has been hard to see how many people are using Python in Japan. The Python community and conference is very large in the US and Europe but until this conference, I had...
-
PyCon JP 2011
The Python Programming Language community in Japan will be having our first PyCon JP on August 27th at the Advanced Institute of Industrial Technology (産業技術大学院大学) in Tokyo’s Shinagawa Seaside. PyCon JP started in the aftermath of PyCon APAC 2010 in Singapore. PyCon APAC 2011 was set to be in Singapore again but the location of the conference in 2012 had not been set yet. Yasushi Masuda , Manabu Terada and me discussed having the 2012 conference in Japan but we were afraid that the Python community in Japan did not have much experience running an event that required that level...
-
Kay 1.1 Released!
The Kay team just just released Kay 1.1! I want to thank Takashi Matsuo, Nickolas Daskalou, Tasuku Suenaga, and Yosuke Suzuki for their hard work on this release. Kay is a web framework made specifically for Google App Engine. The basic design of Kay is based on the Django framework, such as middleware, settings, pluggable applications, etc. Kay uses Werkzeug as lower level framework, Jinja2 as template engine, and babel for handling language translations. Kay 1.1 contains a number of new features and bug fixes. You can see the Release Notes here and can download the release here. We’re excited...
-
An introduction to the Tipfy Framework for App Engine
(This post is the English translation of the Dec. 24th edition of the Python Web Framework Advent Calendar 2010. Other posts can be found on that page, though they will be in Japanese) I usually use the kay framework for App Engine development as I am a developer for the framework, but recently I have been playing with the Tipfy framework written by Rodrigo Moraes. Like Kay, Tipfy is a framework made specifically for Google App Engine. While Kay has drawn a lot of its functionality from Django, Tipfy attempts to be as close to the App Engine SDK’s Webapp...
-
Syncing music on Ubuntu
I recently played around with and figured out how to get syncing working with my iPhone 3GS and Ubuntu Lucid. Syncing is supported out of the box so not hard, but you do have to know what packages to install to get the support you need. This should work for iPods as well. I am using rhythmbox so the following packages are required if using rhythmbox: rhythmbox rhythmbox-plugins - Without these pretty much nothing but playback works. gstreamer0.10-plugins-good gstreamer0.10-plugins-ugly - for MP3 playback gstreamer0.10-plugins - for on the fly Ogg -> MP3 encoding (this is good since iPod doesn’t support...
-
Google App Engine 1.4.0 Released!!
Google App Engine 1.4.0 was just released and has lots of interesting new features. Channel API, “Always On” (reserved instances), Improvements to background processing, Warm up requests, and Metadata queries just to name the big ones. Channel API The Channel API is a way for you to “push” data to the client browser. The Channel is a bit like a socket connection but it’s implemented using Google’s XMPP infrastructure built for Google Talk. So it will scale properly as needed. The Channel API feature includes two parts, a server-side API for creating channels and sending messages, and a Javascript API...
-
New Google App Engine API Expert
Yesterday I became the new Google App Engine API Expert (Python) for the Japan region. Google Experts are the equivalent for Google API Gurus as they are called in the US. I will be helping out other developers in Japan to learn about and use App Engine and successfully deploy projects. I’ve been playing with App Engine since just after it came out in 2008 and I’ve built a number of sites from my company’s homepage, to applications for internal use, to a site for sharing code snippets. I’m currently helping to test out new features, and provide information and...
-
bpssl - The Django SSL Support Application
The other day I released bpssl which is a Django application that helps you support HTTPS on your website. The main functionality is performing redirection for HTTPS only URLs and views. For instance, if a request for your login view /login is received over HTTP, the provided middleware can redirect the user to the equivalent HTTPS page. Specifying views and URLs as secure is supported as are flatpages. Fastcgi and HTTP proxy setups are also well supported. Many people support this at the web server level but the pages that require SSL can change often and it is often easier...