Call Windows Support

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg

Sunday, 10 March 2013

normality has been restored...

Posted on 15:02 by Unknown
...partially, anyway.

When my home machine died, and I upgraded to Windows 7, my incredibly ancient 16-bit Smalltalk/V would no longer work.  As this was what I used to generate the book review pages on my website, it was a bit of a disaster.

So over the past several weekends, I've been re-implementing my book list program, from scratch, in Python, and the new pages have finally gone live.  (There are still broken links from the non-automatically generated pages; I'll fix those next.)

This was my first major foray into Python.  Three years ago, I wrote my first ever Python program -- a Game of Life implementation, using Gosper's hashlife algorithm -- but then didn't touch it again until recently.  Instead, I was using Matlab for all my number-crunching needs.  However, I needed something a bit more friendly for teaching some non-computer science students a little bit about simulation.  So before Christmas I wrote a small flocking program in Python, and a few little bits and bobs.  Then I learned about NumPy, which does a lot of the matrix stuff that Matlab does, so I thought I'd give it a try, by reimplementing some Random Boolean Network code I'd originally written in Matlab.

I was really impressed, so decided to do some more NumPy programming, to learn it better.  I wrote a few programs to support some practicals for a module I teach: a quantum random walk simulator, an iterated function system, and a 1D cellular automaton.  And after that exposure, I decided I was deeply in love with Python.

But the book list program is my biggest yet, by a long way.  All the previous programs had a core of essentially about 10 lines of code (each of those lines doing a lot, mind you!), each written in an hour or so.  The book list program is several hundreds of lines (many of which also do rather a lot), split over 5 files and several classes.  I also decided to take the opportunity to reorganise and tidy up the structure of my web pages, which involved writing a few utilities, to rename a bunch of files, to write a new table in the database, that sort of thing.  File handling. Database access. All amazingly simple in the marvellous language that is Python.

Although, frankly, I couldn't have done it without the wonderful Stackoverflow forum.  The Python documentation is useful if you know how to do something, and just need to check the syntax or method name.  It's not so helpful if you don't know how to do something. And Python has its own way of doing things.  But every time I typed into Google: "python how to  XXX", for a wide range of XXX, there was Stackoverflow with the answer -- often several answers!  Thanks, guys.

When I started writing this, I was consulting online resources for nearly every line.  But now, I'm happily typing things like
reviews = [bk for bk in have_reviews if bk.isNFBook()][0:10]
without looking things up any more.

And I'm now looking round for my next Python project...
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Posted in algorithm, books, computer, python, web | No comments
Newer Post Older Post Home

0 comments:

Post a Comment

Subscribe to: Post Comments (Atom)

Popular Posts

  • hyperbolic hyperbole
    What's with hyperbolic discounting? It's everywhere ! I first consciously noticed the term at a workshop about six weeks ago, and n...
  • better use seaweed
    As Neils Bohr is alleged to have said , “prediction is very difficult, especially about the future”. My smartphone has a weather app on it t...
  • "Windows support" -- not
    Just had another scam phone call -- someone with a strong Indian accent claiming to be calling from "Windows Technical Support" (o...
  • national stereotypes
    I've just got back from a very productive three day meeting in Paris. Just around the corner from where I was working, there was a marv...
  • retrospective holiday diary day 1: travelling north
    We went to the Lake District last “summer” ; this “summer” it was time for touring the other side of the country: Northumbria. The holiday s...
  • retrospective holiday diary day 5: trains
    Monday 24 September, and the long-threatened rain finally arrived. So this was the ideal day for the planned Carlisle-Settle rail trip . Bu...
  • oh dear
    We have a garden pond to help encourage frogs and other amphibians. Hedgehogs may suffer, however. :-(
  • funfair mirror trees
    One of the trees in our garden has died.  It died last summer in the drought, but we gave it a year to prove to us it really was dead.  It i...
  • retrospective holiday diary day 3: Lindisfarne
    Saturday 22 September, and the weather was still fine, sunny holiday weather so we decided to take advantage of the sunshine, and do Lindisf...
  • more scammers
    So not long after the scam phone call , the phone rings again. It's British Gas -- they get to call me because I'm actually a custo...

Categories

  • 3D printer
  • algorithm
  • astronomy
  • birds
  • Bonnie Tyler
  • books
  • cognition
  • computer
  • conference
  • Doctor Who
  • driving
  • ducks
  • duodecimal
  • education
  • electricity
  • estimation
  • Evernote
  • evolution
  • font
  • food
  • fractals
  • game
  • garden
  • graphics
  • grimoire
  • history
  • holiday
  • humour
  • language
  • LaTeX
  • lego
  • lol
  • mathematics
  • medicine
  • money
  • music
  • obituary
  • pedantry
  • politics
  • probability
  • psychology
  • publishing
  • python
  • quotations
  • research
  • robots
  • science
  • science fiction
  • space flight
  • statistics
  • TPS
  • trains
  • tree
  • TV
  • weather
  • web

Blog Archive

  • ▼  2013 (119)
    • ►  December (1)
    • ►  November (17)
    • ►  October (12)
    • ►  September (10)
    • ►  August (9)
    • ►  July (8)
    • ►  June (10)
    • ►  May (19)
    • ►  April (10)
    • ▼  March (9)
      • my work here is overshadowed
      • hunt the LaTeX symbol no more
      • packing in the toilet rolls
      • the rise and fall of Ctrl-S
      • foggy thinking
      • another evening well spent
      • clear ... snow ... clear
      • what's the point of the TPS?
      • normality has been restored...
    • ►  February (4)
    • ►  January (10)
  • ►  2012 (103)
    • ►  December (16)
    • ►  November (8)
    • ►  October (14)
    • ►  September (6)
    • ►  August (13)
    • ►  July (8)
    • ►  June (6)
    • ►  May (9)
    • ►  April (10)
    • ►  March (7)
    • ►  February (5)
    • ►  January (1)
  • ►  2011 (79)
    • ►  December (7)
    • ►  November (5)
    • ►  October (10)
    • ►  September (7)
    • ►  August (6)
    • ►  July (5)
    • ►  June (6)
    • ►  May (6)
    • ►  April (9)
    • ►  March (9)
    • ►  February (3)
    • ►  January (6)
Powered by Blogger.

About Me

Unknown
View my complete profile