Search

Posts Tagged ‘books’

It’s a little disappointing to me that my Goals for 2011 post is still on the home page of mgroves.com. But que sera.

First, a review of my 2011 goals, and how well I did:

  • Read books.  Bender’s TDD book, yes.  DDD, not so much (it’s a long book!). F# book, no. Beautiful Code, yes a little.  I’ve pretty much abandoned the old dev lunchtime book club due to dailys with my employer at that time, but I’ve managed to sneak in a couple other books too: One on PHP5, reread of Don’t Make Me Think, ASP.NET MVC 3 from Wrox, Lauren Ipsum, and a few fiction titles here and there.  With my new Kindle, I’m able to read a lot more conveniently, though code-heavy books could be an issue.
  • Certification: I think I got a few PDUs from going to the Cincinnati Day of Agile last year, but I’m really slacking in PDUs.  I will take an MCTS exam (70-515) in a couple weeks.
  • Android apps: I exceeded my goals here for sure.  I have 5 apps in the store: 1 free, 1 paid.  One of them (Yeah Dog!) has sold well over 150 copies.  My free one has been downloaded over 1000 times.
  • Conferences & presentations: I also exceeded my goals here, speaking in Pittsburgh (twice), Findlay, Codestock, Devlink, Columbus, Louisville, Detroit, Ann Arbor, Richmond, Stir Trek, New York, and probably one or two more that I’ve forgotten.  The travel has been a bit of a strain on family and finances, so I was already planning to reduce my speaking, even before the “incident”, which I’ll get to later.
  • User groups:  I regretfully didn’t participate in GiveCamp (because of Richmond) in any capacity, but I did help to organize Central Ohio Day of .NET, and I performed okay on the board of CONDG.  I chose not to pursue re-election though (mainly because of the “incident”).
  • Project Euler: I definitely dropped the ball here.  I ended up spending more time preparing and presenting on Euler than I did doing new problems.
  • Blogging: Another fail.  I spend more time on Twitter than blogging, that’s for sure.
  • Surprises: My wife and I successfully launched our first small business, MonthlySauce.com.  Business isn’t exactly rushing in, but we did launch it on schedule.

Stay tuned for my 2012 goals and details on the “incident”.

I set a bunch of goals for myself last year, publicly, and while I didn’t meet them all exactly, I think it was a worthwhile exercise, and really helped to focus me throughout the year.  One of the activities that Brian H. Prince suggests in his “Driving Your Career” series is very similar: sit down every year and figure out what your goals are, because they may change from time to time.

I’ll have a number of personal and internal-to-my-employer goals that I won’t list here, so what follows is only a subset of my overall goals set:

  • Read books.  I’ve already purchased way more books than I need to.  Attending the book club that I helped organize last year is practically out of the question due to schedule changes, but among the books I plan to read on my own include: Domain Driven Design, at least one F# book, Beautiful Code, James Bender’s new TDD book, among other non-dev books like Soul of the Lion and Atlas Shrugs.
  • I don’t really have any certification goals, but to keep my PMP I probably need to get some PDUs this year.  Attend PMP user group meetings and sessions, that sort of thing.
  • I will put at least one app into an Android Marketplace, hopefully one free app and one pay app.
  • Conferences and presentations a-go-go: I’ve already got speaking engagements scheduled at two conferences in Louisville and Detroit, not to mention a remote speaking engagement for a college, and probably other events as the year goes on.  I also intend to attend the normal array of events, including Stir Trek, Central Ohio Day of .NET, GiveCamp, etc.  My goal last year was 3 speaking engagements.  At this rate, I’ll quadruple that in this year.
  • User group involvement: as an officer of the local .NET group now, I will definitely be involved in a major way for regular meetings and special events.  I doubt this will involve much speaking, as it will a lot of behinds-the-scenes work, which is totally fine.  I will do my best to help this community grow and improve as much as I can, not only in CONDG, but the community as a whole.
  • Project Euler: while I definitely overachieved on this last year, the amount of time I’ve spent on it in the last quarter has dropped drastically.  I’d like to get at least another 25-30 of these problems knocked out this year.
  • Blogging: I’m nowhere near the volume I used to do in the pre-MBA, pre-children days, but my blog posts are rising back up, in volume certainly, but also in quality (I hope).  This is in major part due to the much more interesting and fulfilling work I’m doing full-time these days.

I have some other surprises up my sleeve too, which I won’t reveal until the appropriate time.  Suffice it to say, I’m very, very busy, but this could really be a red-letter year for me (and my family, of course).

So: keep me honest.  If you see me slacking, or haven’t heard from me in a while, beat me over the head on Twitter, or in a comment here, or in person for that matter.

I got a Literati eReader from The Sharper Image for Christmas.  The hardware itself isn’t half-bad, but the software is atrociously lacking in features.  So how do I hack this thing to make it better?

Well, I haven’t been able to, yet.  But here’s what I’ve observed so far:

  • It’s running some form of Linux.  I don’t know this for a fact, but based on the GPL/LGPL/BSD/MIT license information in the manual, and what I’ve read about it in reviews, it’s a safe bet.
  • The firmware can be loaded from an SD Card by holding down “Q” while powering on.  I don’t have a copy of any firmware to work with though…
  • A port scan of the device when connecting to my router reveals ports 25, 110, 119, 143, 465, 563, 587, 993, and 995 but I’ve be unable to connect to any of them to do anything useful or get any useful information.
  • There is a file “.kobo/Kobo/Kobo eReader.conf” file on the internal storage that can be used to hijack the “Store” tab in the software to a web address of my choice.  This isn’t particularly useful, as I haven’t yet determined if it runs JavaScript, and if there’s any way to use that to my advantage anyway.

That’s all I got on the software front.  I also cracked the thing open to see if there’s anything easily hackable in the hardware.  I couldn’t find anything, but here’s how I did it in case you’re interested.  Make sure to turn it off first:

Make sure not to lose any of the tiny screws. I used a small pocket knife as a screwdriver, but obviously a glasses-repair sized phillips head would be preferable.  There are four tiny black screws that hold the main circuit board in place, but as you can see above, there’s plenty of solder and wiring that keep the main board from really going very far.

I was hoping to find an SD card or some sort of internal USB port, or…something.  Unfortunately, everything looked very hard-wired and unhackable (at least unhackable by me).

All-in-all, a disappointing experience.  I post this with the hope of either saving someone else the time, or helping some smarter hacker than me to spark an idea.

Connascence (con-nass’-sense) is a term that combines ideas from coupling and the single responsibility principle Connascence means that (1) if you change A, you have to change (or at least check) B to keep the program working correctly, or (2) some change outside of A and B would require both A and B to be changed to keep the program working correctly.

There are many types of connascence, here are a few listed in Chapter 8 of What Every Programmer Should Know About Object-Oriented Design:

Jim Weirich

Connascence of name. This one’s easy: variables have names, so if you change the declaration, you have to change all referring code. These days, that’s usually easy to do with refactoring tools like ReSharper, but consider a SqlDataReader. If you change a column from “foo” to “bar”, then you have to change your SqlDataReader references from dr["foo"] to dr["bar"], and then if you are mapping to an object, you might even want to change MyObject::Foo to MyObject::Bar.

Connascence of type/class. If a variable has a type, (like int), and you decide to change it to string, you (may) need to change code that sets it to an int. C#, a static language, will give you build errors (hopefully) when you come across this situation, but consider a language like PHP or Ruby where, depending on the situation, might work just fine or might not work how you intend in this situation.

Connascence of meaning. This one is a real pain. Let’s say that account number 0 is defined to always be the administrator. If you do that, then your code might have a bunch of if(accountNum == 0) { doAdminStuff(); } all over the place. If you ever changed that, you’d have to make changes almost everywhere.

Connascence of algorithm. This is very similar to connascence of meaning: if you know that the elements in some sort of generic collection (say, List<T>) always iterate the same order that they were inserted, you could build some piece of code to take advantage of that. However, if List<T> doesn’t make any claims to being sorted or deterministic, a change down the road could break all of your code until you change it to a SortedList<K,V>.

Connascence of position. Code must be in the right sequence or the right adjacency in order to work. The only example I could think of for this is method arguments: unless they are named arguments, if you want to switch them, you have to switch them everywhere the method is used. Of course, if they are named arguments, then maybe you are just trading one connascence for another (which might be more easily refactored).

According to Page-Jones, those are all types of “static” connascence, which applies to the code itself. “Dynamic” connascence applies to the execution, or the runtime of the code.

Connascence of execution. This is similar to connascence of position. In some languages, a variable must be initialized before it is used, and that’s an example.

Connascence of timing. This one is related to real-time systems, with which I don’t have much experience. Page-Jones gives an example of an X-ray machine that must turn off n milliseconds right after it is turned on.

Synchronization, get it?  Hey, YOU try to come up with pictures for this stuff.

Connascence of value. The values of an object or variable are constrained. For instance, if you define a rectangle by 4 points, then those 4 points just can’t be any point. Page-Jones also gives the all-to-familiar example of (bidirectional) database synchronization, where two databases are required to hold redundant information. Any minor change in either database could make the whole bridge go kablooey.

Connascence of identity. If an object A and object B must both point to the same object C in order to work correctly, or in concert, then A and B have connascence of identity. So, if A is pointing to some database, for instance, B must be pointing to the same database. If they aren’t they might still work, but show the wrong data to the user, or they might just biff completely at runtime.

Contranascence. So, this is not the opposite of connascence, but rather a “connascence of difference”. If you have an int i; and an int j;, you can’t rename j to i without also renaming i to j (or something else). These variables are related by the fact that they are different. Multiple inheritance can cause all sorts of problems here, as can a language without namespaces.

So, what does all this mean? Page-Jones posits that connascence and contranascence are absolutely key to understanding modern software development. Without encapsulation, managing connascence and contranascence become incredibly hard. A huge chunk of procedural code would be very difficult to make changes to, as it could incur one or more of the above listed connascences and break the program. So, there are three guidelines that he lists to reduce that problem in an object-oriented system:

  1. Minimize overall connascence by breaking the system into encapsulated components (duh).
  2. Minimize any remaining connascence that crosses encapsulation boundaries (single responsibility principle).
  3. Maximize connascence within encapsulation boundaries. (I think this is the key)

Basically, keep like things together and keep unlike things apart. And using the types of connascence, “likeness” can now be qualified.

I’ve been reading What Every Programmer Should Know About Object-Oriented Design by Meilir Page-Jones. It’s been on my reading list for some time since I first saw it mentioned in a video of Jim Weirich’s presentation titled “Grand Unified Theory of Software Design” (about 15:30 in the below video).

UPDATE: I’ve heard that there are some audio problems in some parts of this video, so maybe check out a video of this same presentation at a different conference (about 18:40 is when the book is mentioned).

The book is mentioned mainly to introduce the term “connascence”, as a way to talk about coupling within code. I will write a post about connascence later, but right now I just wanted to give a quick overview of this book, as I haven’t finished it yet.

The book is broken into three main parts:

  • Part I – Introduction: what does object-oriented mean, and why should it be used? This was a sort of review chapter for me, as it just covers the basics of encapsulation, inheritance, polymorphism, etc. I would recommend skimming this chapter, as it doesn’t really cover anything you haven’t covered in an intro to programming class.
  • Part II – Object-Oriented Design Notation: This is a big chunk of the book (5 chapters) which details a visual notation to design and represent objects. This is not a notation that’s in wide use, at least not that I’m aware of, so you might consider completely skipping this part of the book, or at least skimming very fast.
  • Part III – The Principles of Object-Oriented Design: This is the real meat of the book, as far as I’m concerned, and the part that I’m currently reading. This part introduces concepts of a well-designed object-oriented program, including encapsulation, connascense, cohesian, encumbrance, domains, polymorphism, and interfaces.

Well, I’ve been neglecting this blog for some time now. But starting in 2010, you will see some more activity here.

Why? It’s not a New Year’s Resolution, per se (because I think those are silly), but it’s more to do with the mentoring program I’m involved in at work.

See, Quick Solutions matches up programmers with a mentor that acts as a professional resource, career advisor, etc. Mine has asked me to make some concrete, measurable goals to accomplish over the next year, and here they are:

  • Read books: I will be reading around 2 books related to my profession every quarter (for instance, the first one is What Every Programmer Should Know About Object-Oriented Design by Meilir Page-Jones. As I read these books, I will be blogging about them to a) demonstrate my progress, and b) share what I’ve learned.
  • I will be taking the PMP exam in February. Not really blog related, but you might see something about it.
  • Contribute in a meaningful way to an open source project. I’ve already been accepted as a contributor to the PHPExcel project (believe it or not), and I’ve already contributed a patch to it. You may see some posts about my contributions, and what I’ve learned from them.
  • I’ve thought about writing up a whitepaper/case study on the various mobile application marketplaces. There are 3 major marketplaces now for mobile apps, and I’m wondering what the advantages/disadvantages are for each. What is the pricing like, what are the platforms like, what are the marketplace restrictions, etc. I would certainly blog about that.
  • I plan to give at least 3 presentations within the company and/or the local developer community. I’ve already done an intro to CakePHP presentation for the local PHP meetup group, and I’m scheduled to give it internally again. I’d also like to learn more about db4o (and giving a presentation on it is a great way to learn). I haven’t come up with another topic yet. (By the way, if you have a local group you’d like me to speak to about these topics, let me know).
  • I will be attending conferences and seminars at a similar rate to last year, including: CodeMash, Stir Trek, Central Ohio Day of .NET (CODODN), and various Firestarter events and user groups, and what not.
  • I plan to tackle one CodeKata or Project Euler project every 2 weeks for the entirety of the year. I’ll probably do the CodeKata’s in C# and Project Euler’s in some other language (F#, Ruby, PHP, etc). This will represent a large portion of my blogging activity, and will probably be very boring for you non-programmers. Sorry about that.

There are some other things that are part of the plan, but they really are more internal to Quick Solutions, and thus I won’t be blogging about them.

I mention all of this in the hopes that doing so will keep me somewhat accountable: if I don’t do all these things, then it will look rather silly and pathetic for this post to constantly be on the main page of my blog.

This might be a good Christmas gift for my dad (and/or) myself. As regular readers of Something Awful know, there’s a periodic column done by Zach Parsons about overly ambitious/wacky/odd inventions of World War 2. Giant tanks, giant cannons, ice aircraft carriers, etc.

Note that while Something Awful usually is squarely in the “fiction” or “satire” department, these are real inventions/ideas from World War 2, mixed in with humorous descriptions, hypotheticals, and technical specs. Here’s some examples:

Anywhoo, Zack Parsons has put 20 of these inventions into a paperback book, suitable for coffee table or bathroom reading. My Tank is Fight can be pre-ordered on Amazon for about 9 bucks. For that price, I might pick up a couple. If the previous SA articles are any indication, this book will be well worth it, especially for someone who is into WW2 history.