They say you learn something new every day.

Posts tagged ‘computers’

Less Advanced Than You Think (24/03/2012)

I remember a while back reading that “Listen Again” (the radio version of iPlayer) only accounts for 2% of all radio consumed. And being amazed.

This was in 2009, so it may not still be true now, but I don’t expect it’s moved that much.

The thing is: most people aren’t as technically advanced as you think. Not being they’re stupid, they’re just not as interesting as you are (especially if you’re reading this, you’re almost certainly in the top quartile. Even if you don’t think it, you probably are: you’re reading a blog for Christ’s sake. Most people don’t even know what a blog is.)

A colleague of mine has to give a presentation about a Corporate iPhone AppStore that we’re building. Half way through, he realised the audience weren’t feeling it, and so said, “Who here knows what an appstore is?”. About four people their hands up.

It’s back to this thing about making basic applications. Almost no one cares about fancy features. It’s why the iPad and iPhone have taken off, even though they have the computing capacity of my eight year old laptop. Get the key basics right – the things people are actually interested in – and you’ve got them. And get those bits sorted before you start adding all sorts of new features that no one wants.

Couldn’t give a Flying Duck (15/03/2012)

There’s a great post on CodingHorror about solving problems by explaining the problem very clearly.

Bob pointed into a corner of the office. “Over there,” he said, “is a duck. I want you to ask that duck your question.” 

I looked at the duck. It was, in fact, stuffed, and very dead. Even if it had not been dead, it probably would not have been a good source of design information. I looked at Bob. Bob was dead serious. He was also my superior, and I wanted to keep my job.

I awkwardly went to stand next to the duck and bent my head, as if in prayer, to commune with this duck. “What,” Bob demanded, “are you doing?”

“I’m asking my question of the duck,” I said.

One of Bob’s superintendants was in his office. He was grinning like a bastard around his toothpick. “Andy,” he said, “I don’t want you to pray to the duck. I want you to ask the duck your question.”

I licked my lips. “Out loud?” I said.

“Out loud,” Bob said firmly.

I cleared my throat. “Duck,” I began.

“Its name is Bob Junior,” Bob’s superintendant supplied. I shot him a dirty look.

“Duck,” I continued, “I want to know, when you use a clevis hanger, what keeps the sprinkler pipe from jumping out of the clevis when the head discharges, causing the pipe to…”

In the middle of asking the duck my question, the answer hit me. The clevis hanger is suspended from the structure above by a length of all-thread rod. If the pipe-fitter cuts the all-thread rod such that it butts up against the top of the pipe, it essentially will hold the pipe in the hanger and keep it from bucking.

I turned to look at Bob. Bob was nodding. “You know, don’t you,” he said.

“You run the all-thread rod to the top of the pipe,” I said.

“That’s right,” said Bob. “Next time you have a question, I want you to come in here and ask the duck, not me. Ask it out loud. If you still don’t know the answer, then you can ask me.”

It’s a really good point. Too often, we just haven’t sorted through things clearly enough in our head and that’s why we struggle to come up with the solution.

I read this, this morning. And while I haven’t had chance to try it out yet, I can think of times when I’ve done it. And now that I’m aware of it, I’m going to make a greater effort to think through the question when I’m facing a problem.

Moving Times (11/02/2012)

I’m moving house again.

These days, I seem to move house almost every year. I think it gets easier over time. I can’t say I’ve got it down to a fine art (like George Clooney travelling in Up in the Air) but I’ve down it enough times now to know to keep the boxes stored somewhere between moves and things like that.

This time, because I’m hoping to buy a flat soon, I’m renting somewhere for six months which means I’ll be moving again in 5 and a half months time. In some ways it’s a little unsettling. In other ways, it’s upsetting. Of all the places I’ve lived in London, this is my favourite, and I’ll be sad to see it go. Of course, if all goes according to plan, I’ll be moving back in a few months time to a nearby flat. But you never know until the keys are in your hand.

The process has flagged a few things to me though.

It’s made me realise how expensive moving is. But also helped put money into perspective. Sure, you end up paying several hundred pounds in one month, but in no time at all, that cost disappears. Costs are quite transitory like that. It’s reminded me that money is just there to buy you freedom and happiness and to pay for your life. Obviously, your expectations of money vary depending on how much of it you have. When you have enough for a deposit, you start thinking about buying a flat. If you just have enough for a few drinks, you maybe think of going to the pub. The amount you have affects how you think about life.

It’s also made me realise that so few of the things that make me happy cost money. Spending time with my friends and with L. Reading and writing. Messing around with computers and code. Films and TV. These things are largely free. Obviously I need a computer, and maybe I could get a big TV. But these are minor things. What I really want is to have my own place to live which is mine and is safe so no one can take it away (like our previous landlord did).

Finally, it’s reminded me again how much stuff I have. But, more crucially, how little of it I really use. I’ve felt this lesson keenly the last few Christmasess, where I’ve wanted a WiFi Radio (used for about a week, then stopped using), cordless headphones (used for about a month, then gave up) and some GameCube games for my old games console (played for about a week).

The only thing I’ve got that isn’t now just taking up more space as I lug it from place to place is my Kindle. Which I love. There are so few things like that. Other than my computer, laptop, phone and kindle, there aren’t any other consumable electrical devices that I want. I don’t even have room in my life for them.

But it’s more than that. As I empty my cupboards, I’m shocked by just how much stuff is there. I haven’t really forgotten about any of it, it’s just when you see it all, it amazes me how much there is. And it’s faintly confusing how I feel like I need it, and I can’t throw it away, but I never use it.

Half of my moving time seems to go into boxing up things that I don’t want.

I’ve learnt that I don’t need to buy any other things (I forgot to mention my jumping stilts and my mini laptop, that sit around unused these days).

I’ve learnt that I don’t need much stuff. And in fact, I should spend more time focusing on what I do want. Give the stuff you do want to use space to breath rather than cramping it in with stuff you don’t want. It’s like designing a user interface. You don’t cramp the button you’re going to use a lot right at the bottom of the screen surrounded by buttons you never use.

Finally, I reminded again about recalibrating. I’ve always known I like having fewer things. When I move I always clear up as well. I always say I’ll just get out what I need. But I still have so much stuff. I almost need to pack all my stuff up every month or six months, just how much there is that I don’t need.

Less Manual Work (08/02/2012)

I’m reminded again about this bit of wisdom from Coding Horror:

Truly lazy developers let their machines do the work for them. This is partially motivated out of self-interest, it’s true, but smart developers know that people don’t scale— machines do. If you want it done the same way every time, and with any semblance of reliability, you want the human factor removed as much as is reasonably possible. I know for every problem I encounter at work that causes me to lose time, I ask myself— how can I make sure I never have to deal with this problem again? If my solution fixes it so nobody ever has to deal with that problem, that’s a nice side-effect, too.

It’s close to my heart, because I’m very lazy as I keep saying.

But while I know this, and I mean it and I say it to anyone who will listen, I keep encountering problems that I solve by doing a bit of manual work. And suddenly, I’ve got loads of manual systems that I’m involved with.

I don’t really know a way around this. This is something so close to my heart, and yet I still get caught up in things and end up in a manual mess. I think the only thing to do is keep track of all your project somewhere, and recalibrate regularly – possibly every month. If this blog has taught me anything it’s:

  1. Doing things regularly works. But only if you stick at the regularity
  2. You need to recalibrate regularly. More regularly than you think. As humans we get used to things very quickly.

Unlocking the Scroll (26/01/2012)

Do you know, after all this time, it was only today that I discovered what the Scroll Lock key does. There’s been a couple of times in Excel when I’ve found that the arrow keys are scrolling the window rather than moving cell, and I’ve assumed that there was a setting on, but it was only today that I thought it might be scroll lock.

So scroll lock sets the arrow keys to scroll the active window. Simple, eh? But I’ve never realised that before. And, asking around the office, no one else had either.

Of course the question now is whether I can actually use this knowledge in anyway way. I suspect it’s not that useful, but at least I’ll know to turn it off when Excel starts behaving weirdly.

Apples and Pears (21/01/2012)

I’m a Windows user. Yes, you can stop booing now. But I don’t get Macs. I don’t get why they’re all white. I don’t get why there’s only one mouse button. I don’t get why everyone gets so excited about them being “pretty”. My fridge isn’t pretty (it is white though), but I still like that. Unfortunately, I’ve been required to use a mac at work to run our internal iApp store using xCode.

The process of using it has been a bit of an eye opener as well as a much needed slap in the face. I tend to think I’m good at computers, but using a Mac I feel so left handed. Even the simplest of tasks, like navigating to a downloaded file, is incredibly difficult. This must be how my Mum feels when using a computer. Given this, there are probably some things to learn about teaching people how to use computers.

However, while I’ve been trying to be balanced, there are some elements of the mac user interface that I think are objectively wrong.

Don’t get me wrong. There are some bits that are great. This, for example, is brilliant:

This is brilliant

You can’t tell just how great it is here, because it’s a picture, but in the real one, the fingers move. This is a great way of  explaining a quite complex task.

Of course, like all great things, it looks like this has been shamelessly copied:

Shamless copy

It’s clearly been “inspired” by the Apple feature. But the CGI fingers aren’t nearly as nice as the real ones. Not to mention the fact that there are more tick boxes and closer together in the Windows version.

However, I’m not ready to switch to macs just because they have a nice animation.

One of the big problems with the Apple interface is that too much stuff is hidden and not obvious unless you know it. Take the iPhone. How was I supposed to know that double tapping the click button loads up the “task manager”? I didn’t even realise double clicking the click button was a valid action.

There’s so much of this. To right click, you hold control and click. How is that obvious? I’m reminded a comment a friend of mine made once that good games, and applications, allow you to see the state of play and work out valid moves just by looking at the board or screen. Apple applications hide valid moves away. It creates a clique. Which, to be honest, is probably what they’re trying to do.

Also, I’m with Tog, the Apple dock is rubbish. It’s huge and takes up way too much of my screen estate. I had a Windows dock app once. And you know what, I turned it off. I like the quick start bar in Windows. It’s small. I like the start menu. It’s hidden.

I also find it strange how related items are physically distant from each other. Which is made more apparent in applications that load windows all over the screen. Of course, this is part of the maximizing button behaviour. Maybe I should just accept this as a tom-are-to/tom-ay-to thing (although, let’s be clear: the former is English, the later is American. It’s not a free choice which one to use, it’s an accent!).

But I like my windows maximized to my screen, so I can see what’s going on. Having floating windows encourages me to waste my time organising windows. And dragging and dropping windows is not work.

I think really, there are two things for me to learn here. Firstly, be humbled by my computer abilities. As I’ve said when I started this. I’m stupid. We’re all stupid. And I’m never be anything but stupid. However, if I learn something new every day, I might end up a bit less stupid than I started.

Secondly, UI design is tough. And teaching computers is tough as well. You can never make the design too simple, the text too easy to read or too short. It’s something I continue to work on with my software management application at work. For this to be successful it needs to be really easy to use and the text I send out needs to be so simple people grasp it almost immediately.

All is not lost (19/01/2012)

Support@tumblr.com were unable to retrieve the post I lost. It’s one of the first things I can think of that I’ve irrevocably lost on a computer. It’s somewhat ironic, because I’ve only just started my backup plans.

The “missing post” was about some free OCR software called tesseract. It’s not a massively important post, and I have a copy of the one key thing about it (the command line syntax) which is:

tesseract.exe FILE output -l eng

As well as, somewhat ironically, the pictures. Unlike Jeff I’ve kept the pictures but lost the text.

Here they are, showing the effect of the update. Accuracy of old version:

Old version

Accuracy of new version:

New version

However, I don’t want to talk about what’s missing.

Since I started my aim to learn something new each day, I’ve managed to write something every day. But losing this post was the first time that made me think, “oh damn, is it worth it”. It really annoyed me – perhaps more than it should.

There’s a section in Transformative Entrepreneurs where Jeffrey Harris talks about what makes people successful:

Successful entrepreneurs combine optimism, creativity, passion, courage and perseverance. They have an uncanny ability to keep going when times get tough. They have such excitement about what they are doing, and a need to prove to the rest of the world that their idea has merit and that they don’t quit.

Now, admittedly, losing one post isn’t the biggest set back in the world. It’s nothing compared to the set backs Mr Honda went through before his company became successful:

Like most other countries, Japan was hit badly by the Great Depression of the 1930s. In 1938, Soichiro Honda was still in school, when he started a little workshop, developing the concept of the piston ring.

His plan was to sell the idea to Toyota. He labored night and day, even slept in the workshop, always believing he could perfect his design and produce a worthy product. He was married by now, and pawned his wife’s jewelry for working capital.

Finally, came the day he completed his piston ring and was able to take a working sample to Toyota, only to be told that the rings did not meet their standards! Soichiro went back to school and suffered ridicule when the engineers laughed at his design.

He refused to give up. Rather than focus on his failure, he continued working towards his goal. Then, after two more years of struggle and redesign, he won a contract with Toyota.

By now, the Japanese government was gearing up for war! With the contract in hand, Soichiro Honda needed to build a factory to supply Toyota, but building materials were in short supply. Still he would not quit! He invented a new concrete-making process that enabled him to build the factory.

With the factory now built, he was ready for production, but the factory was bombed twice and steel became unavailable, too. Was this the end of the road for Honda? No!

He started collecting surplus gasoline cans discarded by US fighters – “Gifts from President Truman,” he called them, which became the new raw materials for his rebuilt manufacturing process. Finally, an earthquake destroyed the factory.

After the war, an extreme gasoline shortage forced people to walk or use bicycles. Honda built a tiny engine and attached it to his bicycle. His neighbors wanted one, and although he tried, materials could not be found and he was unable to supply the demand.

Was he ready to give up now? No! Soichiro Honda wrote to 18,000 bicycles shop owners and, in an inspiring letter, asked them to help him revitalize Japan. 5,000 responded and advanced him what little money they could to build his tiny bicycle engines. Unfortunately, the first models were too bulky to work well, so he continued to develop and adapt, until finally, the small engine ‘The Super Cub’ became a reality and was a success. With success in Japan, Honda began exporting his bicycle engines to Europe and America.

His plans were stopped by the whole world going to war and his factory was destroyed by a blooming earthquake. But he didn’t give up. I’m not sure I’m there yet. I think if an earthquake destroyed one of my projects I’d probably call that one a day, but I think this is an incredible lesson to us all.

The thing I’ve learnt today is to be successful you need to carry on even when you fail. Even if you fail ten times and then succeed, you’ve succeeded. Succeeding isn’t not failing, it’s working through all the failures to get to the success at the end.

It’s like that old joke:

“Why do I always find my keys in the last place I look?”

“Because you give up looking when you find them.”

The only way to not fail is to keep trying.

The other thing, of course, is to review your failures. They may be painful, but failure is the only thing you can learn from.

Consequently, I’ve reviewed Jeff’s list of “how to backup” again and looked at my process:

  • Don’t rely on your host or anyone else to back up your important data. Do it yourself. If you aren’t personally responsible for your own backups, they are effectively not happening.
    [I assumed queued posts were backed up. They weren’t]
  • If something really bad happens to your data, how would you recover? What’s the process? What are the hard parts of recovery? I think in the back of my mind I had false confidence about Coding Horror recovery scenarios because I kept thinking of it as mostly text. Of course, the text turned out to be the easiest part. The images, which I had thought of as a “nice to have”, were more essential than I realized and far more difficult to recover. Some argue that we shouldn’t be talking about “backups”, but recovery.
  • It’s worth revisiting your recovery process periodically to make sure it’s still alive, kicking, and fully functional. 

And I’ve got a plan to stop this happening again.

The only knife in the spoon drawer (14/01/2012)

I’m getting to the stage now, where I don’t know how you can be good at any modern job without being able to code. Almost any computer based task can be done more efficiently or intelligently, if you’re able to write scripts.

Going back to work, I need to remember not to let my head get big. I know a bit about coding, and so I’m able to fix problems that no one else can fix. However, this doesn’t mean I’m awesome at coding. It just means I have a different skill than everyone else in my office.

It’s like being the only knife in the spoon drawer. Everyone marvels at you because you’re able to cut small things, even if you’re just a butter knife. But you’d still lose in a sword fight.

I’ve had this before in other jobs. I don’t actually think it’s a bad thing, having a different skill set to everyone else. Sometimes setting someone with a different skill a task has interesting results. I’m sure it would be beneficial to get some chess players to manage a football team. They’d probably come up with some new ways of playing the game.

However, there’s a real problem here, in that it makes you feel better at things than you are, and stops you getting better. I’m reminded of a section in The 7 Habits of Highly Effective People:

There’s a guy who stumbled into a lumberjack in the mountains. The man stops to observe the lumberjack, watching him feverishly sawing at this very large tree. He noticed that the lumberjack was working up a sweat, sawing and sawing, yet going nowhere. The bystander noticed that the saw the lumberjack was using was about as sharp as a butter knife. So, he says to the lumberjack, “Excuse me Mr. Lumberjack, but I couldn’t help noticing how hard you are working on that tree, but going nowhere.” The lumberjack replies with sweat dripping off of his brow, “Yes… I know. This tree seems to be giving me some trouble.” The bystander replies and says, “But Mr. Lumberjack, your saw is so dull that it couldn’t possibly cut through anything.” “I know”, says the lumberjack, “but I am too busy sawing to take time to sharpen my saw.”

I think this is really key. It’s one of the reasons I started this project; to review each day and record what it is I learnt. Admittedly, there’s been a number of days, like today, where it’s a bit meta, but I don’t think that’s a bad thing.

A while back I flicked through a presentation about expertise by James Back. It’s an interesting undermining of expertise, which I think is very important. Fundamentally I concluded that if you think you’re good at something, you stop improving. And if you’re not getting better, you’re getting worse.

Level 0: I overcame obliviousness
I now realize there is something here to learn.

Level 1: I overcame intimidation
I feel I can learn this subject or skill. I know enough about it so that I am not intimidated by people who know more than me.

Level 2: I overcame incoherence
I no longer feel that I’m pretending or hand-waving. I feel reasonably competent to discuss or practice. What I say sounds like what I think I know.

Level 3: I overcame competence.
Now I feel productively self-critical, rather than complacently good enough. I want to take risks, invent, teach, and push myself. I want to be with other enthusiastic students.

Backup to the Future (09/01/2011)

And so my backup quest continues. What I learnt today was probably the most important thing so far: actually backing up the files on my computer.

There were three important requirements to my plan:

  1. It must be automatic.
  2. It must be free.
  3. The process must not affect my life or computer use.  

I turned today to looking at ways at backing up the important files on my computer.

My plan with these is to upload them to my webserver. This will probably be quite a big job at first, because there are a lot of them, and I’m happy to do this once, as long as I can do automatic incremental backups from then on.

Thankfully, I found WinSCP. Having played with it a bit now, I like WinSCP – perhaps more than Filezilla. For my purposes, what is really useful about WinSCP is that it allows you to run commands from the command line.

It took me a little while to figure this out, but I got there in the end. First you need the .bat file, something like this:

winscp /script=file.txt

This will run winSCP against the commands stored in file.txt

Then we create file.txt:

open ftp://USERNAME:PASSWORD@ftp.SERVERNAME.com
synchronize remote “D:\Files” /www/Files/
exit

This logs onto the FTP server with the given credentials and synchronizes the local file against the remote one. It adds all the missing or updated files.

What’s particularly good is you can add lines and lines of as many folders as you like. It works so well, that I’m thinking of setting all my FTP folders up like this, and ditching FileZilla entirely.

However, I still had a problem. Running the .bat file loads up a command prompt window.

 Black window of fear

Now these windows are harmless enough (although I remember a friend saying to me once “whenever I see one of these I just think ‘something has gone really wrong’.”)

However, remembering back to #3 I don’t want the process to affect me. And a black window popping up does. Allbeit not very much. Look, I just don’t want to see the black window, okay?

Luckily, there’s a way round this. Instead of running a bat file, you run the command in vbscript:

 ’Create scripting Object
Set oShell = CreateObject(“Wscript.Shell”)

 ’Run script in invisible mode
 oShell.Run “winscp /script=UploadList.ini”, 0, false

This runs the command invisibly, so I don’t even know it’s doing it. And because it’s a synchronise, it will just identify all the new or changed files and back them up.

I could put it as a scheduled task, but I turn my computer off and on everyday, so I’ll stick it in the Startup folder, and just let it run when my computer boots up. Backup plan complete, I believe.

What’s also good is that it’s another command line piece of software for me to add to my collection. I’m aiming to use a lot more command line software in 2012 and automate more things if possible.

Backup to the Drawing Board (06/01/2012)

Continuing my plan to backup my life, I turned to all the images for this blog. Yesterday I figured out how to back up the content to another WordPress blog, using If This Then That. The next stage is to backup all the images.

I store all of the images on my website so that they’re all in one place. In one way, this is a bit silly, because it means I bear all the bandwidth costs. But, hey, apparently I’ve got 7TB of monthly bandwidth! Considering this site is just a log for me, I think I’ll be okay.

The upside of this is that because all of the pictures are stored in one place, they’re very easy to backup.

But, remembering back to my requirements yesterday:

  1. It must be automatic.
  2. It must be free.
  3. The process must not affect my life or computer use. 

Now that I have If This Then That set up, this shouldn’t be too hard. I want the system to automatically copy a picture to Dropbox each time I add one to my site.

There are three things I’ll need to do to achieve this:

  1. Write a script to recursively list all the files in my site
  2. Turn this into an RSS Feed
  3. Set up an IFTT script to import the contents on this RSS Feed into DropBox

My web server runs PHP so I’ll need to get my PHP thinking cap on.

PHP was one of the first server side scripting languages I learnt. But I haven’t touched it for a while now, and going back to it, it feels really weird.

Why, for example is, the command to replace elements of a string str_replace() rather than, say, replace()? It’s like they’re trying to make this harder!

It’s strange because PHP is considered an easy hackers language, but playing around with it now, after using vb, it feels a bit clumsy.

Anyway, once I’d reminded myself of the syntax, I put together the script.

The first bit was the command to recursively list a directory. Now, there is a PHP class for recursively listing directories, but because of my server setup I couldn’t use that.

So I had to write my own (with a bit of help from the Internet).

function getDirectory($path = ‘.’,$URL)
{

// Directories to ignore when listing output
$ignore = array(‘.’, ‘..’);

// Open the directory
$dh = @opendir($path);

// Loop through the directory
while(false !== ($file=readdir($dh)))
{

// Check that this file is not to be ignored
if( !in_array( $file, $ignore ) )
{

   // If it’s a directory iterate over that
   if( is_dir( “$path/$file” ) )
   { getDirectory(“$path/$file”,$URL);}

   // If it’s a file print out it’s name.
   elseif (strpos($file,”.php”) === FALSE)
   { echo $URL.$filename; }

}

}

// Close the directory handle
closedir( $dh );

}

 One of the key bits is this:

$ignore = array(‘.’, ‘..’);

if( !in_array( $file, $ignore ) )

I’ve looked into listing directories before, but had problems with the “.” and “..”. This neat checks solves that.

The other thing I had to do was produce the full URL so DropBox can download files:

$URL =’http://’.$_SERVER[“SERVER_NAME”].$_SERVER[“REQUEST_URI”];
$URL = substr($URL,0,strrpos($URL, “/”));

This gets the address of the file running, and then trims off the filename. It was the easiest way I could find of doing it.

The next stage was to create an RSS Feed:

//Send headers to Browser

header(“Content-Type: application/rss+xml”);

//Current Date in Correct Format

$now = date(“r”);

// Output beginning to RSS Feed
echo “

Backup File feed
http://www.imagedissectors.com/downloads/tumblr/index.php
Backup Feed
$now
$now

  ITEM TITLE
  URL TO ITEM
  GUIDE
  DATE PUBLISHED
”;

Once this was written, configuring ITTT was easy.

IFTTT Appearence

IFTTT seems to cache the feed and then compare it to it’s cached version to work out what’s a “new feed item”. This confused me at first, but now it means I don’t have to mess around with dates.

It also seems to have a cap of 29 items in one transaction. Again, this threw me at first, but all it means is that I needed to do an initial backup of everything, and then IFTTT does incremental backups from now on.

Part 2 of my backup strategy is complete.

Tag Cloud