Archives for posts with tag: pragmatic

Kicking off with the most familiar type of database (relational) we start our journey with PostgreSQL.

Now having used MySQL (whee!) and Oracle (boo!) quite a lot in my day job(s), I consider myself to have a pretty good grounding in relational database magic. Although having said that, I’ve never actually used PostgreSQL, and have heard fanatical talk about how “amazing it is” when compared with similar DB’s, so I’m looking forward to enjoying some of that wonder for myself.

So to start, we’re left on our own to install the application (which is fine by me), and as the book mentions, we get more of the good stuff due to the space saved. Thanks to pacman (not the greedy yellow thing that’s s**t scared of ghosts) it’s all sorted in one command, done!

Day One

For first part we’re taken through some of the basics of relational DB’s, namely creating tables with relationships which we join across, adding indexes to improve performance etc – the usual stuff, that if you’ve been a developer for more than a week you should know by now!

It’s nice to have a some exercises to walk through but generally you’ve seen it all before, and it becomes a little tedious. Don’t get me wrong, I understand why it had to start like this (to give some context and a decent introduction to the 5% of readers not familiar with the material), but you just have to go through the motions and accept that the goodies will start soon. Sooner than I expected to be honest, I thought the whole PostgreSQL chapter was going to be (inevitably) a little slow, but I was definitely wrong there …

Day Two

Starting off with the usual aggregate functions (COUNT, SUM, MAX etc) you get that “been there, done that” feeling again, but before you know it you’re stumbling into new territory (for me at least).

Key areas that tweaked my interest were talk of distributed databases and the CAP theorem (Consistency vs Availability vs Partition Tolerant, of which you can only ever support two of the three), PL/PGSQL scripting (which initially gave me cold sweats when recalling Oracle’s own PL/SQL, but the knowledge of other scripting solutions, ala Python, Ruby, gave some welcome relief), and rules. I was impressed by rules in particular, reminiscent of metaprogramming or AOP for SQL, where you can essentially rewrite a user’s query to add a welcome twist – the example given in the text is insertion of a record into a view, although I can imagine countless other applications of this.

After day two I’m feeling like I’ve learned some interesting new things about PostgreSQL, which were well worth my time, …,  but just wait until the craziness of day 3 …

Day Three

Here’s where things really get interesting! We start looking at many of the PostgreSQL contrib packages, allowing us to take the DB from the usual every-day querying tedium to the fringes of artificial intelligence!

Rather than sticking to basic equality or wildcard matches used for querying an actor’s name in a movie database we extend our schema to use various natural language processing libraries. This gives our humble set-up the ability to match ‘Broos Wils’ correctly as the star of the Die Hard films (many thanks on behalf of members of the SMS generation everywhere), most impressively matching based on how words “sound” using metaphones.

We finish up querying for movie recommendations based on a multidimensional hypercube (had to put that in ‘cos it makes me sound well clever). It basically works by comparing similarity of the various genres into which a movie falls (action, romance, comedy etc) – but check out the book, they explain it much more clearly!

Finishing Up!

To be honest I didn’t expect much from this chapter, nothing more than a recap over old knowledge anyway, filling the relational database corner for completeness and comparison. And yes it did start out a little like that, but it quickly moves into much meatier territory that sucks you in and teaches you things you had never considered possible in a RDBMS … or maybe that’s just my ignorance. Regardless, I’m impressed so far, and I am definitely looking forward to reading about databases I don’t already “know”!

Disclaimer

‘Seven Databases in Seven Weeks’ is still in production, and this preview was based upon the beta 2 release. The material is likely to change.

Check out the following links for more details :

http://pragprog.com/book/rwdata/seven-databases-in-seven-weeks

http://www.sevenweeks.org/

This year, on August 19, celebrate Whyday. Set aside that day to remember Why’s contributions to our community and culture by hacking just for the fun and joy of it.

  • See how far you can push some weird corner of Ruby (or some other language).
  • Choose a tight constraint (for example, 4 kilobytes of source code) and see what you can do with it.
  • Try that wild idea you’ve been sitting on because it’s too crazy.
  • You can work to maintain some of the software Why left us (although Why is more about creating beautiful new things than polishing old things).
  • On the other hand, Why is passionate about teaching programming to children. So improvements to Hackety Hack would be welcome.
  • Or take direct action along those lines, and teach Ruby to a child.

http://whyday.org/

Hmm I wonder what to do!!??

As you may have figured I’m a bit of a pragmatic publishers fanboy (If only I had more time to read!). Anyway here’s a short post about some more goodies from them.

Books cost money and take time to read, and occasionally you invest your money and time only to realise you should have tried something else – argh!

Good news everybody! The pragmatic programmers have helpfully created a magazine that you can download for free! (free as in free beer!!). It basically outlines different subjects / articles based on some of the up and coming books. This gives you a nice taster on a range of subjects to help you make your mind up about which technologies to check out.

Take a look, I highly recommend!

Here are a selection of the magazines published so far :

Click the image to download

… and for the main site :

http://www.pragprog.com/magazines

I’ve been looking for original tech tutorials on the net. I read _Why’s guide to Ruby some time ago and really loved the style, finding it a great approach to check out Ruby, and to learn in general.

Unfortunately most tutorials on the net are pretty dry in comparison, so I decided to try and hunt down more of these fun ‘books’.

_Why’s Poignant Guide to Ruby

_Why’s guide is an awesome introduction to Ruby. You’ve probably already heard of it (it’s world renown), and if not then you should definitely check it out. It’s how I first got into Ruby (and dynamic languages in general).

Unfortunately _Why has disappeared from the programming world for now, shutting down all his sites and code repositories last year. But his book lives on, and those who have read it await his return (kinda like Jesus).

Learn You a Haskell for Great Good

Now functional languages are well-known for being a bit abstract and ‘out there’. Not as straight forward as procedural code, and not as intuitive as the object-oriented paradigm, but arguably much more powerful, functional programming is well worth checking out.

A good place to start is Haskell and the guide ‘Learn You a Haskell for Great Good’. Inspired by _Why’s Ruby guide, it is really easy to understand, and a joy to read (doesn’t feel like learning at all!).

AES Encryption

The only other similarly styled tutorial I could find was one about the Advanced Encryption Standard (AES). A pretty heavy subject, but made easier by the stick man drawings.

Seven Languages in Seven Weeks

The pragmatic publishers produce some great books, and one on the cards for this summer is ‘Seven Languages in Seven Weeks’. This book will run through seven languages including Ruby and Haskell, teaching the basics of each in turn.

I think a great compliment to this book would be a collection of alternative tutorials, (we already have the two for Ruby and Haskell).


Any More?

So if you know of any other similar ‘alternative tutorials’ I’d love to check them out – please drop me a comment if you have any ideas!?

The general gist of the book, as you can probably guess from the title, is about being more creative, learning more effectively and generally using the grey stuff upstairs to maximum effect! This is where this article / blog comes in. Basically I thought the best way to absorb the valuable info held within its pages would be to (hopefully) give a nice, swift summary of its contents – hopefully not ruining it with my dire writing skills.

So here we go! – Starting with the mind map in the front of the book as my guide I’ll go through and outline the golden nuggets (lucky charms?) in the pages.

 

 

So What’s It All About?

Learning (Obviously)

Yes, ok, so you already guessed this, it being in the title and all. Basically a ton of different theories and methods are mentioned for improving learning, including the dreyfus model, learning through play, synthesis over analysis and many many more, …

Understanding & Creativity (Enlightenment)

Do you ever get that eureaka moment, when you’ve been stuck on the same problem forever and suddenly … something clicks … it all makes sense! – finally!! Well, learn how to tease these moments out, rather than straining your poor brain trying to force them out (you don’t want to give yourself a stroke now do you!?).

Watch Out for Those Habits

Not only computers have bugs. Millions of years of evolution has developed the human brain (and it’s pretty impressive), but not without it’s flaws. Sometimes we still behave like animals, without even realising it! How do we workaround this!?

Focus (How to be Efficient) 

Hmm, what should I grab for lunch, how long til the weekend?? – Oh sorry, um … well you get my point anyway … (cheese)

So in the next few posts I’m going to cover a topic at a time, give you a flavor of what’s going on – and show you how awesome those pragmatic books really are! Check this one out! http://pragprog.com/titles/ahptl

(And no, i’m not getting paid to say this, I do just really like it)

Follow

Get every new post delivered to your Inbox.