Showing posts with label blog. Show all posts
Showing posts with label blog. Show all posts

Sunday, February 19, 2012

My blog is moved

From now on I'll be blogging from http://pydanny.com.

See you there!

Friday, February 10, 2012

Looking to move off blogger again

Every once in a while I think about moving off of blogger. My favorite part about it has been the reliability of hosting from a large provider like Google. However, I'm not a fan of the changes that have been occurring in terms of UI and delivery. While I don't have to use those changes now, I worry about being forced to accomodate them in the future.

Audrey launched her new site using Jekyll on Github and has been mostly happy. I've been trying out Jekyll, as I like the idea of blogging in a markup format rather than write the HTML I do here (RST-to-HTML-to-blogger is not a fun process).

I may go for Hyde instead, because it's a Python based solution and I can get finicky that way. On the other hand, Jekyll, at least in terms of documentation, is much more polished at this time. This may sound childish, but figuring out the kinks is not something I want to do with a blog - I just want to write and be sure my site doesn't go down.

All I know is that after doing so much note taking with restructured text, git, and Read the Docs, doing it in almost bare HTML in Blogger is really, really tiresome. It's time for a change!

Sunday, September 4, 2011

Responses to Github is my resume

Shortly after I posted Github is my resume the responses started coming in. They seemed to fill these categories:

"Github is a portfolio, not a resume!"

I think this is rather valid, being a much more accurate description of the role that Github and other social coding sites are having in getting developer jobs these days.  Two of the more choice responses in this category were posts by Gini Trapini and Andy Lester.

"In X years of hiring, I've never requested source code along with the resume!"

This comment raised the issue that personality, location, writing skills, etc were important. I agree that being able to not annoy your team into losing productivity is important, but it doesn't negate the frequent desire to be able to review the work of potential hires. Ignore the code at your own risk.

"Using only binary for calculations, how many ping pong balls fit in your car?"

A couple people said they prefer to ask programming questions or challenging problems in interviews to seeing portfolios of code. Personally, I think a few programming questions are okay but in my opinion 'challenging problems' all too often means sticking your interviewees with puzzles and trick questions that all too often have nothing to do with the day-to-day work of being a developer.

Thursday, January 6, 2011

I don't work in a vacuum

Not too long ago I wrote a blog rant called 'Stupid Template Languages'. I suspected I was setting off a firestorm, but I have to admit I didn't quite expect to have the singular honor of having both Armin Ronacher and Mike Bayer respond to me in their own blogs. As one might say, "Danny, you really stepped into it."

My initial response to their entries was to start writing another post that would refute what they said point-by-point. However, while the tone in my original post was somewhat confrontational, the problem is that I didn't want to turn the debate into a sordid affair with drawn sides. You see, I've long respected both Mike and Armin as developers and people. Even if I didn't care about them, all it would do is stir up angry retaliations and steer people away from good tools. So I linked to their responses, let it go, and I hope we can drink over the issue this year at Pycon.

However, if we step away from the tools, the real problem I was addressing in my post was this:

I don't work in a vacuum

Any tool has the potential for misuse. As Alex Gaynor pointed out in Django Dose, he is familiar with the poorly crafted system which was part of the reason why I wrote 'Stupid Template Languages'. Heck, anyone reading this blog has probably run into one of those nightmarish system created by others that we have to maintain, and many of us will sheepishly admit to having been the author of such systems.

When you create a system like that you are making things harder for others to contribute and enhance. Trivial tasks become monumental and the desire to post your sad story to The Daily WTF becomes very strong.

Don't work in a vacuum

There are the well-documented methods called 'best practices' that us programmers ought to follow in order to make our work more maintainable.  In the general programming world, patterns like Model-View-Controller (MVC) is a common way to break up pieces of a project into predictable components. In the Python world, we generally follow a set of standards called 'pep-8' for writing our code. Various groups and organizations often have additional standards for naming, tests, and documentation styles.

Standards can be created without wisdom or consideration for real-world issues. Too many tests and documentation can eat up time on a project and cause interminable delays; there are horror stories about developers writing pages of non-technical material in order to produce a single line of working code.

Following these methods and doing so with wisdom is like striving for a platonic ideal. It is both gratifying and time consuming to reach for perfection - and this perfection is fleeting because of the shifting requirements of clients, operating systems, and tool changes. To attempt to reach for this helps a person be considered a good developer, but doesn't guarantee that they are actually good.

Breaking the rules

Sometimes you have to abandon best practices. Sometimes the tool at hand makes it hard to perform a task without breaking the rules. In the python world a good example is monkey-patching, which we do with trepidation. In the relational database world, people with a deep understanding of normalization will sometimes indulge in de-normalization in order to boost performance.

Unlike best practices, there is no platonic ideal that clearly states when breaking the rules is a good thing. Ever seen a database created by a developer without any knowledge of normalization who smugly says their database is better because it started off de-normalized? How many of us have seen views where control and persistence is integrally embedded? Or where views are embedded in control code?

In regards to the debate that triggered this post, I've read the following phrase a few times as an argument against my rant: "We're all consenting adults here".

Does that mean we can do what we want? That we can write spaghetti code?

Certainly most people reading this post will know that statement generally refers to variable handling in Python, not the right to sunder the rules of good coding practices. Yet I've seen people use that as a mantra to ignore any sense of good coding practices for python related projects. Which meant that the level of effort to maintain and expand those projects increased at the same rapid rate that the bus factor decreased.

Conclusion

I'll just throw out some well known platitudes:
  • Code like you aren't in a vacuum. 
  • Break the rules only when you have a concrete reason. 
  • Learn to take criticism well.

Tuesday, May 11, 2010

Code highlighting on blogger

Thanks to Luka Marinko I have code highlighting now!

def python_funct():
   a = a + b
   print "Hello Highlighted code"

class Foo(Bar):
   pass

Wednesday, February 10, 2010

Eating my own Dog Food

For several years now I've hosted this blog here on blogspot/blogger. Its been both a good and bad experience. For writing out simple posts it has made things pretty easy. However, if I try to post code examples I've got to deal with the various quirks of the blog engine. How it escapes special characters and that you can't easily do color colorization has been really annoying. Yes, I know you can do some hoop jumping to make this work, but I decided a long time ago that if I had to do that then I would host my own blog.

Speaking of which, a few months back I got called out for not eating my own dog food. Yup, as a Python developer shouldn't I use something Python powered? I currently do Django professionally so those are in my tool chest so this should be trivial. Heck I also do some serious Pinax work so why not that?

Whatever I put it under, it would be a nice move. I would be able to format and control my blog to a much better degree. I could easily supply code examples. I could use the hosting to demonstrate pet projects or launch some of the things I've wanted to try for some time.

So which blog to use? Roll my own?

Heck no.

I've got a full-time job, I teach 10+ hours a week, and my consulting efforts eat up a chunk of my free time. So rather than use my energy to reinvent the wheel, I would rather rely on the hard work and labor of others.

With that in mind, I really, really like Django-Mingus. Out of the box it does everything that I want and is a breeze to get up and running. It has a large, active community and it even uses a project that has my name attached, django-wysiwyg (although Chris Adams did most of the work).

Some might ask the good questions as to why I'm not using Pinax for my new blog. In essence, I wanted to do something in the wild that wasn't Pinax powered and my concept projects all use Pinax. So don't worry, I'll be doing Pinax work for as long as I can foresee.

So I've begun working on it during the Blizzard of 2010. I'll have it up today unless we lose power or Internet.

Monday, December 28, 2009

New Year's Python meme

Tarek Ziade blogged this first. I'm just following the herd cause thats what a lone wolf does...

1. What's the coolest Python application, framework, or library you have discovered in 2009?

Django and Pinax. Technically I discovered those in 2006 and 2008 respectively, but it wasn't until 2009 that I got to really dig in. Django was really a blast from the outset of 2009, but it was about five lines of code that made me realize this was the framework to follow. Pinax is like a magical function decorator for Django, what more can I say?

Sphinx rocks too. I don't use it enough!

2. What new programming technique did you learn in 2009?

Thanks to James Tauber I really got into JQuery. Thanks to Brian Rosner I really got into Git as a DVCS. Yeah, I know YUI and HG are part of things too, but my dark secret is that part of why I really dig JQuery and Git so much is the guys who got me started on those tools.

3. What's the name of the open source project you contributed the most in 2009? What did you do?

Its a toss-up between Django Uni-Form and Pinax.

Django Uni-Form is my first successful open source project and about 75% of the code is mine, plus all the documentation and most of the marketing. Speaking of which, every NASA Django project (except for one) uses Django Uni-Form. Its in use by Discovery Channel, PBS, Washington Post, Washington Times, Richmond Times, and more. Of course, it wouldn't be anywhere near the success it is without the contributions of nearly a dozen people.

For Pinax I haven't done as much of the code as I wanted in 2009. Personal life issues swallowed up a lot of my time and energy, but I certainly evangelized and documented and taught it nearly every day. Pinax is not just me, its James Tauber, Brian Rosner, Jannis Leidal, and the rest of the Pinax and Django communities.

4. What was the Python blog or website you read the most in 2009?

Twitter. Certainly there are blogs I really enjoy following, but twitter is where it was at in 2009 for me. I read every blog it seems on Planet Python and Django, but my favorites include (in alphabetical order) Alex Gaynor, Chris McDonough, Jacob Kaplan-Moss, Jesse Noller, and Tarek Ziade.

5. What are the top three things you want to learn in 2010?

Driving cars.
How to cook again.
Much more Capoeira.
Something really nifty in Python I don't know yet.
How to count to three.

Thursday, November 12, 2009

Reconnecting

Yeah, this isn't technical, but it is still a post!

I remember the first time I met a best friend. I was four years old. I saw another boy obviously my age walking on his tip-toes. Maybe he was trying to be taller. His nick-name was Scooter, and to this day I've got no idea as to what his name was. It was in his house that I remember seeing men on the moon live. I was five when I moved away. I saw him a few times but we grew apart. Eventually we lost touch.

I was six years old and just starting first grade when I met John. I think his last name was Oplenger. We became inseparable and I remember navigating my way across a mile to find his house. That was back in the 1970s when kids did that sort of thing. We made stop-animation super 8 films together. I was eight when I moved away but we stayed in touch for several years. Eventually our interests grew apart and we lost touch. I might have seen him a few times in my late teenage years, but I didn't have the guts to go up and talk to him.

We moved as I turned 16 so I switched high schools at the end of my sophomore year. I left the people I knew behind. I lost touch real fast with most of the people I knew back then. Thanks to Facebook I've reconnected with a few. Yet I wonder what ever happened to Mark, Steve, David, Jack, Donald, Katy, and many others.

After my aimless college years I drifted uselessly for a while. I lost touch with people I knew in my second high school and college. In 2000 thanks to Google and the now wretched classmates.com I started to reconnect with those old friends.

During my aimless college years I met a smart, pretty girl named Christine. She was the one I should have dated. Ha. The follies of youth.

I'm sure over time I'll find everyone I knew. I'm delighted to find these people and to see how their lives worked out. That even the craziest of us have turned into responsible parents seems like destiny. In return, no one seems surprised by how my life has turned out.

But the ones I really miss are the ones whose names I can't quite recall, or whose names are so generic that finding them seems impossible. People like Scooter, John, Christine, and others.

19 more posts to go!

Wednesday, November 11, 2009

Picking a Django powered CMS

Note as of October 2011


The CMS options have changed greatly since I wrote this blog post in 2009. I might write a more current post. In the meantime, instead of FeinCMS, use Django CMS, Mezzanine, or use the CMS grid on Django Packages to make your own decision.

Back to the old blog post...


A few months ago I asked the community to help us (NASA SMD) pick a Django powered CMS.

The response of the community was awesome. We were provided a decent sized list of CMS candidates to evaluate. We got a lot of responses, both in comments on my blog, twitter messages, and even direct emails. We compiled the list and got to work.

Now it was time for evaluation. As much as I wanted to do it myself, this was given to the capable hands of my co-worker, Chris Adams. I was a bit jealous because I like to explore, but that's how it worked out.

First Chris used a process of elimination to weed out the ones that were unusable based on my published requirements:
  • Was it actually open source?
  • Was it 508 compliant or easy to make so?
  • Runs on PostGreSQL and MySQL?
  • Is there an active community?
That narrowed things down a bit. Now Chris added some more filters:
  • Could you show pages nested inside of pages? In order words, could you rely on Tree Traversal for display of content?
  • Was there documentation? In English?
That reduced things to an even smaller list. Chris took the revised list of candidates, downloaded the code, and started them up. During this process he removed candidates that required patching to get working at the most basic level. He also looked at the code and made a few judgments there as well.

Day by day it was a sad to see the list get smaller and smaller. Each project was the labor of many hours by talented people who cared about their work. Yet Chris had a job to do, and while he didn't drop candidates easily, he did drop them.

Chris now added our sample content to each surviving candidate and invited the rest of the team to look at the code and the results. It was now up to our subjective evaluation. Two finalists stood out as winners, FeinCMS and Django CMS 2. They were so close that one might consider the results to be a tie. Both met all our needs, their code bases smelled pretty nice, documentation felt complete, code had test coverage, and the community active. They even shared a lot of the same dependencies!

The call was very close but in the end we picked FeinCMS.

Django CMS 2 was a very, very close second. I cannot say that enough.

In a few months we'll announce the front facing site we are building. We'll contribute the work we can to the open source community, which will either be work done on FeinCMS or stand alone applications.

Finally, I want to make clear the amount of effort and clarity of work Chris Adams put into these evaluations. He did the hard work and he did it well.

20 more posts to go!

Tuesday, November 10, 2009

Python Wars

Python Wars Solo was the result of a few hours effort roughly duplicating a text-based Star Trek game I wrote back in 1980-1981. I wrote the game in Apple ][ basic, and it had you 'fly' the USS Enterprise against up to nine Klingon ships. You could fire phasers, launch photon torpedoes, take evasive actions, and it seemed pretty fun. Beating one was a piece of cake. Three was a fun challenge. Five was tough. Seven was done only a few times. Nine was never done. The game was simple, fast, easy to learn, and tons of fun. Back in High School it was one of the games traded on floppy disks during the computer club so I considered it a success.

Back in 2007 I decided to try and reconstruct the software. One thing I did was was write most of it in one quick code dash of near stupidity. My theory was that it would more closely match the feel of my efforts as as 15 year old wrestling with Apple ][ basic without the benefits of a manual.

Some changes from the original:

* Rather than name it after the Star Trek universe, I named it a bit generically.
* Switched from phasers to a spinal mount weapon like what they used so wonderfully in Babylon 5.
* Changed from photon torpedoes to missiles.

The result worked, and was fun to play in dribs and drabs. The code is embarrassing, but that was kind of the point.

http://code.google.com/p/python-wars/wiki/PythonWarsSolo1

Do a svn checkout (svn checkout http://python-wars.googlecode.com/svn/trunk/ python-wars-read-only), and then python go.py. Don't laugh too hard!

I'm toying with moving this this over to Github and even doing a formal release. That would be really funny.

21 more posts to go!

Monday, November 9, 2009

Code I'll reuse

When I'm evaluating a package to use in my work or play I tend to look at five things. I think many of my on-line colleagues look at a similar list. If its missing too many of these things then odds are I'll go somewhere else for my needs or roll my own.

Documentation
Did the author bother with a README file? How about some sphinx documentation? How complete it it? Does it get me started and give a few basic examples?

I'm okay with typos and mistakes. These happen. But I want to see

Licensing
Everyone has their own idea of what they like for licenses. I like the MIT/BSD thing. I can understand the attraction to LGPL and GPL although they aren't for me. What I can't stand and won't use are monstrosities like GPL/Commercial used by such libraries as ExtJs.

Want to make money off your software? Easy... let anyone use it and charge for support. Worked damn well for communities and companies like Python, Django, Plone, various Linux distributions (Redhat anyone?), etc...

Eggification
Is your software constructed so that it can be installed via easy_install or pip? And yes, this is a bit of mild embarrassment for me, so I'm happy enough to eggify other people's work.

Tests
Do you have tests? Even a nearly empty tests file or folder? How about a test application? If you have no tests then your package is suspect. How do I know it will work independently of your personal computer?

Code Quality
Does the code smell bad? Can it be easily extended? If its innovative but the code needs work is it on a DVCS so more people can easily contribute?

22 more posts to go!

Sunday, November 8, 2009

What I love about Python

A ways back I wrote about eight things I don't like about python. I'm in a good mood today so I'm writing about what I love about python.

Typing
Let's imagine I have long, blond hair and am named Goldilocks.
Goldilocks tried the first language and everything was rigid and method overloading was painful. Too static!

Goldilocks tried the second language and everything was too loose and crazy. Evaluators could fool you into thinking different types equaled each other, causing many false positives. Too loose!

Goldilocks tried the third language and it had some rigidity but not too much. Method overloading was so easy you did it without thinking. Evaluation gotchas were non-existent. Wonderfully dynamic and strong!
Everything is an object

To be honest, most of the time we don't care that everything is an object. We just code. However, when it counts, it just makes life so wonderful.

Intelligently named built-in functions and keywords

The functions like help(), print, list(), file(), dict(), and most other things are named elegantly and simply. Print is obvious; put, say, or echo are not.

Um... so maybe dir() and zip() are not very clear.

Whitespace
I love proper indentation. When I look at other people's code in other languages, first thing I do is start fixing their indentation issues. Python makes that so much easier for me.

Competing web frameworks

When I was first playing with Python I heard people gripe that the volume of web frameworks in Python is a bad thing. I wasn't so sure then and now I completely disagree. Competition is a good thing, and friendly competition is even better. Otherwise things go stale and the community suffers.

Python's web framework designers tend to get along really well. While the community leaned this way I believe that Mark Ramm has been instrumental in keeping things friendly.

The Community
Most of the time the python community is the best. They are open minded, smart, willing to learn, and willing to teach. And no one makes too much fun of my gushing man-crush on Guido.

23 more posts to go!

Eating your own dogfood

Since way back in 2007 when I blogged about JSON and Python I've used blogspot as my blog engine. I've never been completely happy with it because it didn't easily support code coloration. Still, it worked, had great up time, and I got used to it.

Recently though on twitter I've been getting a few dings about using python to host my blog. And since I've now captured pydanny.com and pydanny.net it makes even more sense. I toyed a few times with writing my own blog engine but while I've done it for my job, I never wanted to do it for myself.

So I've been shopping around for what I consider the best blog engine for me. I had a lot of great options thanks to a blog engine query asked in April. In the end we just extended the Pinax blog engine with a few widgets and that was good enough. Anyway, recently I started to look at those again as viable options.

However, one more option presented itself. Kevin Fricovsky's Mingus. It has everything I want in a blog, and also seems to closely follow what I would like to think I would have done in my blog. That is, to say, he fetched bits and pieces from all over the Django ecosphere and assembled them into one universal whole. Yup, I like it a lot.

So my plan is over the next week or so is to set it up on a Webfaction account and start blogging from there.

24 more posts to go! (I'm behind on days but plan to make it up with posts)

Thursday, November 5, 2009

Foxpro

In the 1990s I was working for a small company doing a mix of help desk support, system administration, and development. I hated the help desk work, didn't like navigating Windows for system administration, but liked development. Even though development was Foxpro.

Yup, Foxpro. All of my Foxpro work was on Foxpro 2.6 for DOS. A few people in the office were working with Visual Foxpro 5 and 6, which meant a Visual Basic style IDE and whatever object model Foxpro adopted. But I was working in the DOS shell and that seemed easier. At the time I thought a fancy IDE was better, and wasn't until around 2003 that I changed my mind on that subject.

So anyway Foxpro was on the decrease even back in the 1990s. It took a bit of work and some luck to get out of the Foxpro closet. Fortunately I made it out. Yet I still have a soft spot for the language and too. My guess is that it is merely nostalgia for a different time in my life, and if I actually looked at Foxpro I would feel ill.

25 more days to go!

Sunday, November 1, 2009

Posting every day this month

It is customary amongst some to post something on your blog every day of November. There is at least one site for this sort of thing (http://www.nablopomo.com). I think I'm going to try out this strange custom. So that means between now and November 30th each day will see some new content added to this blog.

If you are doing the same thing (blogging each day this month), let me know and I'll link to your blog from here.

So here is to 29 more blog entries!

Friday, June 19, 2009

Thanks for San Francisco Link

Until I unite my blogs under a new location in the distant future, here is my original posting:

http://dannygreenfeld.blogspot.com/2009/06/thanks-for-san-francisco.html

Wednesday, January 28, 2009

Strangeness on Planet Plone

I submitted that my Plone tagged blog posts be added to Planet Plone months ago. Maybe a year ago. Today it seems that I have been accepted to the blogroll.

Unfortunately Planet Plone is slurping up all my posts in one big go, and they do not seem to be in order. My guess is that their is a synch issue between what blogspot and Planet Plone uses as the update field in RSS. Don't you just love specifications used as guidelines?

Anyway, I'm sorry about the confusion. It will be over soon.

Monday, January 5, 2009

Useful python code for blogspot users like me

The big grief I have with blogspot is that it does not give you an easy way to display code, especially when it comes to XML. Well, that is now accounted for thanks to a handy script by the notable Davide Muzzarelli.

So instead of this (view the source to see the XML instead of just numbers):


65
20
300
2400
300
25
50


You get this:

<daily-values>
<total-fat units="g">65</total-fat>
<saturated-fat units="g">20</saturated-fat>
<cholesterol units="mg">300</cholesterol>
<sodium units="mg">2400</sodium>
<carb units="g">300</carb>
<fiber units="g">25</fiber>
<protein units="g">50</protein>
</daily-values>

Thank you so much Davide!!!

Thursday, November 8, 2007

New blog format

I hate super narrow columns of text in blogs. So I changed my layout.

I'm not happy with blogger. But until I launch some sort of professional site again, I'll just stay here.