Redirecting STDERR to STDOUT
I like to post things that I just learned so here’s a good one. Some batch commands output their errors to the STDOUT and/or STDERR by default. If you’ve got a long batch script this can cause an issue because the output is lost due to the command line truncating the output.
Now most people know about redirecting the output to a file like so:
1: command -option arg > commandlog.txt
However, this is only handling STDOUT, most commands will put error information (which is what we’re most interested in) to the STDERR. So how do we get at that?
Well to log both do this:
1: command -option arg > logfile.txt 2>&1
The final token there redirects STDERR to STDOUT, thus putting it all into logfile.txt.
You can also log to seperate files if you like.
1: command -option arg 1> stdoutlog.txt 2> stderrlog.txt
That concludes today’s lesson. I hope you find this useful at some point!
Good times.
Cities I visited in 2008
Bit of a generic post but meh! It’s fun to make lists! So here goes…
- London, UK
- Sheffield, UK
- Leicester, UK
- Birmingham, UK
- Muscat, Oman
- Bangkok, Thailand
- Phuket Town, Thailand
- Manchester, UK – doesn’t really count because I live here.
Wow that was boring….I think I just found a new New Year’s Resolution! Here’s ninja cat:
Playing with dynamic styles in IE and the Dev toolbar
Ever wanted to isolate just one element and mess with the style after it’s been generated with javascript? It’s always been a bit of a tall order with Internet Explorer due to the lack of Firebug and the unrealistic results when using IE developer toolbar to change styles. However, the latter tool does have a feature which allows you to save the element outside of the page with all styles copied, even if they were generated by javascript! Awesome.
You will need: IE, IE dev toolbar
Here’s how:
- Load up your page

- Open the dev toolbar and select the element using the aptly named element selector or in the DOM tree
- You will see all the styles in the developer toolbar.
- Right click the element in the DOM tree and selected Element source and style
- A new window will open with the HTML for the element, nicely formatted

- Click File>Save>Original HTML Source
- Save the file where you want
Now you have your element with all the CSS that was applied to it in the main page in an external file to play with at your leisure!

[The pictures are from RSinteract, a product I am working on.]
Enjoy!
Book Meme
“She seems more angry and shaken than worried by the intrusion”
Accelerando - Charles Stross
via James Simm
Book Meme:
- Grab the nearest book.
- Open it at page 56.
- Find the 5th sentence.
- Post the text of the sentence on your blog along with these instructions.
- Don’t dig for your favourite book, the cool book, or the intellectual one: pick the CLOSEST.
Happened to have Accellerando in my bag but haven’t actually started reading it yet! I wonder what the intrusion is?
Post FOWA 2008
After experiencing FoWA for the second time, I felt it was a bitter sweet conference. The talks were not as compelling as last time around overall but there were plenty of them and a few gems in there. The real suprise for me was Ben Huh. His talk about keeping users interested in your site was fantastic and his interactive choose-your-own-presentation-ending idea was inspired.
Future Of Web Apps 2008
It’s that time of year again (I can’t beleive I’ve had this blog for a year and only written 6 things, including this!). The UK’s premier web conference - The Future of Web Apps, is coming back to London in 2008. I was there last year for all the Halo and Diggnation madness! It was brilliant. This year it’s even bigger and better with heavyweight speakers including Kevin Rose, Jason Calcanis, Mark Zuckerberg (!) and even Ben Huh from I Can Haz Cheezburger!. Should be very interesting.
(more…)
All Aboard the Test Driven Express
Recently I’ve been following the great store front tutorial for ASP.NET MVC. To begin with it’s actually a tutorial about patterns and the new features of .NET 3.5 such as LINQ to SQL. In this respect it’s a great place to start learning to create .NET web applications. Rob Conery’s brisk but explicit style is excellent and really keeps you interested. I highly suggest any developer watch this series. (more…)
Pushing for Change
In a the constant rush of new techniques in the development world it’s hard for us (and by us I mean working developers) to keep up with everything. That is the point though, you don’t have to. Not everything we learn will be ultimately useful to us. I learned “awk” in university but I’ve never used it. However, this doesn’t mean we can be complacent either! I want to learn about the latest developments or I feel like I’m losing my grip on my skills, personally I think that’s a trait of all (hmm - ed) developers. Granted, I’m sometimes a little behind the crowd (I didn’t touch .NET until 2005) but that’s neither here nor there.
Ideas, Motivation, Goals and Fish
Lately, I’m finding it hard to get excited about work. What’s that I hear you cry? No one gets excited about work! I’m not just talking about work to get paid I’m talking about work for fun, work in your spare time. This may be just post-travelling wind down, but it feels deeper and I think I know what the problem is: I have no goal. Without a goal you’re just treading water and that doesn’t get you anywhere.
Stack Overflow Beta
Some of you may have heard of Stack Overflow, the web app Jeff Atwood over at coding horror has been working on for the past 6 months or so in collaboration with Joel Spolsky and various others. The aim of the project is provide a proper platform for programmers to exchange expert information for specific and general scenarios. If you caught the reference to expert sexchange you may understand that aforementioned godforsaken-hell-hole of a site has a similar premise.











