tag:blogger.com,1999:blog-50828285662405199472024-02-07T08:49:27.735+00:00Tim Abell's blogAll the posts here have been copied over to my main site at https://timwise.co.uk/ - this blog is kept online for posterity, avoiding bit-rot / link-rot, and the comments.Tim Abellhttp://www.blogger.com/profile/18329208508756809573noreply@blogger.comBlogger84125tag:blogger.com,1999:blog-5082828566240519947.post-54007320845172960932017-01-17T23:36:00.000+00:002017-01-17T23:36:03.863+00:00New year new blogSo-long blogger and thanks for all the fish.<br />
<br />
My content to date will live on here for as long as google keep the bits spinning.<br />
<br />
Find my new blog at <a href="http://blog.timwise.co.uk/2017/01/17/new-year-new-blog-happy-2017/">http://blog.timwise.co.uk/2017/01/17/new-year-new-blog-happy-2017/</a> which will live for as long as I pay wordpress.com's bills and don't screw up my DNS config.<br />
<br />
See y'all on the other side. Don't forget to subscribe to the new RSS feed.Tim Abellhttp://www.blogger.com/profile/18329208508756809573noreply@blogger.com1tag:blogger.com,1999:blog-5082828566240519947.post-17018000266351880502016-09-27T07:31:00.002+00:002016-09-28T07:44:06.085+00:00javascript dates in firefox and localesToday I learnt:<br />
<br />
You actually have to reinstall firefox using a different download to get `new Date(dateString)` to use a different date format (i.e. non-US).<br />
<br />
<a href="https://jqueryvalidation.org/date-method/">https://jqueryvalidation.org/date-method/</a><br />
<br />
<blockquote class="tr_bq">
This method should not be used, since it relies on the <code>new Date</code> constructor, which behaves very differently across browsers and locales. Use <code>dateISO</code> instead or one of the locale specific methods (in localizations/ and additional-methods.js).</blockquote>
<br />
So if you're using chocolatey or boxstarter like I am (<a href="https://gist.github.com/timabell/608fb680bfc920f372ac" target="_blank">my boxstarter script</a>) you need to add the locale flag: <a href="https://chocolatey.org/packages/firefox">https://chocolatey.org/packages/firefox</a><br />
<br />
<code>choco install Firefox -packageParameters "l=en-GB"</code>.<br />
<br />
Reinstalling the package with --force is sufficient to change it.<br />
<br />
It would seem chrome has no way change the format from en-US.<br />
<br />
To be clear the correct solution is to do as the documentation says and not use that method, however it's a bit mean having a pitfall like that in the API. And sometimes you just have to work with the code you have...Tim Abellhttp://www.blogger.com/profile/18329208508756809573noreply@blogger.com0tag:blogger.com,1999:blog-5082828566240519947.post-52935966851710433772016-03-18T15:25:00.000+00:002016-03-18T15:25:03.455+00:00yet another good-commit-messages postSome guidance for writing better commit messages: <br />
<br />
<ul>
<li>this isn't a bad guide <a href="https://vip.wordpress.com/documentation/commit-messages/">https://vip.wordpress.com/documentation/commit-messages/</a></li>
<li>mentions git but broadly useful: <a href="https://robots.thoughtbot.com/5-useful-tips-for-a-better-commit-message">https://robots.thoughtbot.com/5-useful-tips-for-a-better-commit-message</a></li>
<li><a href="http://chris.beams.io/posts/git-commit/">http://chris.beams.io/posts/git-commit/</a> more along similar lines (I'm not fussed about point 5), and wrapping is a git thing not a tfs thing.</li>
<li>A list of highlights of changes in bullets is often nice to add, makes it easier to spot the key changes in a large diff</li>
<li>Also remember your code and your commits can last a veeeeeery long time, and you never know what poor soul will have to understand what you did and why years later... <a href="https://youtu.be/G45hqWNScvE">https://youtu.be/G45hqWNScvE</a></li>
</ul>
<br />Tim Abellhttp://www.blogger.com/profile/18329208508756809573noreply@blogger.com0tag:blogger.com,1999:blog-5082828566240519947.post-38052741025210548222015-12-24T18:06:00.002+00:002016-01-07T01:12:57.381+00:00Starting up a startupI've been contracting for 3 years now, which fits nicely with my drive to have real customers and build business(es). But I still have an itch. I've now found something to scratch that itch (taking the metaphor too far, sorry about that).<br />
<br />
I'm going to write about my latest adventure here, from the
perspective of me as a coder who's aspiring to be an entrepreneur, so if
you're interested in my personal journey on this then do add my blog to
your rss reader etc. of choice. I'll try and tag them all with startup
so you can filter if you aren't interested in my other ramblings :-)<br />
<br />
This post tells the story how I got involved in this startup, and some of the technical choices made so far and what we have in place already.<br />
<br />
<br />
<i>So here's how it started for me:</i><br />
<br />
I found out via twitter that the the <a href="http://www.startupbritain.org/bus-tour" target="_blank">startup britain bus</a> was coming to Reading, so I went to say hi. They were a friendly crowd, and whilst there I found out that there's actually a new startup group in the area called <a href="http://www.connecttvt.co.uk/" target="_blank">ConnectTVT</a> associated with the new co-working space called <a href="http://growgreenpark.co.uk/" target="_blank">grow@greenpark</a> over in green park just off M4 J11. That beats traipsing into the big smoke for me and is just the kind of melting pot I've been looking for. I know plenty of tech folks given that I'm a professional coder, but it doesn't seem sensible for me to start a business with people with the same skills and the same blindspots as me. None of my "normal" friends seem to have the same entrepreneurial itch that I do; I needed a broader pool. I went straight from the bus to grow to check it out and met some more lovely friendly people. A few weeks later (I think) I went back again for one of their startup grinds to see what was going on. There was a small group of interesting people with diverse interests and talents, from accountants to designers and a few tech folk. One of the people there, <a href="http://somelivingroom.blogspot.co.uk/" target="_blank">Richard</a>, had an elevator pitch for a new take on the property market which made some sense to me and seemed well received by the group. All the people there offered their various advice and help. Richard has had experience in the property market that's led him to this insight and having mulled over the idea for quite some time was interested in how this concept might become something more real. Lacking the tech background to just go and build it himself he was interested in what kind of scale of task this might be and how to find people who could help. I offered to provide advice any time and passed Richard my contact details. I didn't at that point have any plans to get further involved.<br />
<br />
I very much enjoyed meeting everyone, and went home with a head full of ideas and inspiration. I found myself still thinking it all through in the small hours that night, regularly grabbing my phone to make yet another note on the <a href="https://trello.com/" target="_blank">trello</a> app detailing some idea about this property thing and how it could work, how you might get over the network-effect bump etc. Clearly this wasn't going away. So I messaged <a href="https://www.linkedin.com/in/louize" target="_blank">Louize</a> who runs the meetup to get in contact with Richard and said it had been keeping me awake with ideas, and she got us in contact again.<br />
<br />
After mulling the whole thing over for a bit longer, it occurred to me that there is no reason I couldn't do more than just provide advice, and maybe I should offer to provide a more concrete involvement. After all, I think the idea is great, and it's not like I'm busy making any of my other ideas I have into businesses yet. Richard would certainly be much better able to build at a much lower financial risk with a technical co-founder. So after a load more discussions around the idea, the odd trip to the pub and some discussions around practical arrangements that is now what we are doing.<br />
<br />
<br />
<i>How's it going?</i><br />
<br />
The first thing has been to really understand Richard's vision, this has mostly involved talking lots. I set up a trello board for the startup, and that's been great for doing a brain dump of all the ideas and todos, and getting them into some sort of organisation, then moving them into "do later" or "needed for launch" kind of groupings. I've also pointed Richard at <a href="https://balsamiq.com/products/mockups/" target="_blank">balsamiq mockups</a>, which these days has a slick web based editor and presentation mode. I've used it in the past to great effect when helping stakeholders in other projects understand what they're really likely to get before all the expense of building the wrong thing. In this startup it's already been really useful for hashing out ideas of how the site might work and even for getting reactions and insight by way of putting it in front of people and seeing if they understand the concept and how you would use it if it were a real thing already. Inspiration for this process is taken from the excellent book <a href="http://www.amazon.co.uk/Dont-Make-Think-Revisited-Usability/dp/0321965515" target="_blank">Don't Make Me Think</a>.<br />
<br />
<i>Hosting choices...</i><br />
<br />
In terms of building something real, Richard bought a domain, so we have somewhere to put it. I spent forever over <a href="http://www.commitstrip.com/en/2015/12/09/this-language-sucks/" target="_blank">technical choices</a> because basically you <i>could</i> use just about any technology stack, any programming language, cloud PaaS, IaaS or private servers etc. and in fact they would all work. There's actually nothing to completely rule out anything. Some great things have been built on top of apparently terrible technical choices (wordpress is lovely but php that it's built with is known for being buggy and hacky). There's much stock put in "cloud" these days, and it does have benefits such as infinite scalability (of your wallet), but it comes with an overhead of complexity and potentially vendor lockin (though that like everything can be mitigated). So call me a luddite but I've gone for an old fashioned linux VPS (virtual private server) where I can easily put a ceiling on costs till we have an income. Unlike so many modern startups that rely on farming people with free shiny stuff until they have enough they can magically make money off the back of them, burning VC cash all the while in the name of profitless growth, we're going to provide users with value, and charge them appropriately for that value, which naturally puts the brakes on the kind of explosive growth of free users that can overwhelm an ambitious startup's site. So I've made a decision at last, hunted around for a provider I could trust and bought some hosting. There's a lot to choose from so I needed a way to narrow down the field, especially given there's a lot of not very good and not very well supported VPS offerings out there. I thought there might be an advert in <a href="https://www.linuxvoice.com/" target="_blank">Linux Voice</a> magazine, which is where I found my uber-geeky ISP <a href="http://aa.net.uk/" target="_blank">A&A</a> (check out the <a href="http://www.revk.uk/" target="_blank">boss's blog</a> if you want to know how far that rabbit hole goes), but there weren't any. So I hopped on #linuxvoice on freenode irc and asked in there, and sure enough the good folks at the mag said they'd been using <a href="https://www.bytemark.co.uk/" target="_blank">bytemark</a> and had been happy with their support. Sold.<br />
<br />
So I bought bytemark's basic VPS offering, and now have a server on the internet that I can point everything at and run everything we need on no matter how quirky the needs. While we have a manageable number of users this should suffice, we're not planning any multi-million pound TV adverts any time soon. I expect if we're successful we'll have growing pains no matter what platform we're using, it's non-trivial to scale even if you're on a so-called scalable platform in the first place. There's lots of gotchas, unexpected interactions and bottlenecks in any system as it grows.<br />
<br />
If it sounds like I'm trying to rationalise my decision that's because I am, I'm aware that whatever technical (and even non-technical) decisions are made at this earliest of early stages have rippling effects that are hard to reverse once you build more on top of them. However equally no matter which choices you make, none of them are truly irreversible, and there are myriad ways of tackling any of the problems that come your way in time. I've had the privilege of seeing teams that are running decent scale operations in both .net and ruby on rails, which are two very different platforms with different cultures and different sets of problems, but interestingly the difference in the overall scale of the challenge and how easy it is to get things done in the long haul was not noticeably different as far as I could tell.<br />
<br />
<i>Mailing lists and landing pages:</i><br />
<br />
The first goal is to have a way to let interested people know when we've got things to show them, tell them the story, and when we need their help. That means a mailing list. Bulk email isn't for the feint hearted these days in the modern world of aggressive spam filters, SPF (no not sunblock), domain keys and increasingly rigid legal constraints as we try to fight outright spam on the wild west of the internet so I don't fancy doing it all myself. My go-to service for this is <a href="http://mailchimp.com/" target="_blank">mailchimp</a>, and I haven't been disappointed. But for this to work we need an email address, and that means MX records and pointing it at some mailserver somewhere. I did look into gmail as a possible shared mailbox but it doesn't seem to do what we're after, so now I have a server running anyway I can just use that. No artificial limits, no snooping, no unwanted advertising.<br />
<br />
It turns out that bytemark provide a very nice customised build of debian called <a href="http://symbiosis.bytemark.co.uk/" target="_blank">symbiosis</a>, which has a bunch of useful services already installed, and a watchdog service that'll restart anything that's fallen over. Nice! It didn't take me much fiddling to get the basic web hosting to behave and get an email account on it set up. I then used the domain control panel to point the A & MX records at our shiny new server (by way of a bit of chaining of CNAMES which will be slightly slower for the first lookup but will be easier to maintain). I then had to redo the web and mail hosting because I hadn't realised that bytemark had made the server do multiple domain hosting using a neat folder based system, but that didn't take too long and it's all good learning time without customers breathing down one's neck!<br />
<br />
I've now done a rudimentary holding page for the domain, with a sign-up form for the mailing list, which was goal number one. You can see it here: <a href="http://www.xchain.co.uk/">http://www.xchain.co.uk/</a>. If you're interested in the concept or progress then please do sign up to the mailing list. It's easy to unsubscribe if you get bored of it ;-)<br />
<br />
I've added <a href="https://www.google.com/analytics/" target="_blank">google analytics</a> to the site, which is very useful albeit slightly evil, so at least we'll have some idea if it's getting any traction as we start to spread the word (taking all stats on the internet as extremely approximate of course). I might switch to one of the more libre solutions at some point but that would require a bit more time and this is after-all a commercial venture and not an open source project. Much as I like working on open source for the greater good, I haven't yet managed to make it pay the bills. I think it's important to have metrics for a startup so you can tell if what you're doing to spread the word is actually having any effect, and what might be putting off potential customers.<br />
<br />
We've sent out a mailing or two to the few people we've got signed up at this early stage (hello mum!) as much for practice as anything, and I'm impressed with mailchimp's collaborative capabilities and previewing system.<br />
<br />
<i>Tech stack</i> <br />
<br />
You may have noticed I still haven't entirely picked a stack, nothing I have so far has locked me in to a decision. I don't want to be paying for or locked in to Microsoft's world (and the associated treadmill of change), so although I do their stuff for a living I don't want to tie my own startup to them, so that's out. I'd prefer an open source stack as I think it matters whether you enjoy working on the platform you've chosen, and open source is just so much nicer to work with as a coder / dev-ops. Currently I'm thinking a golang based server, backed with postgresql (the industry's finest database) serving up a JSON/REST API to an AngularJS + Foundation frontend. This gives us scope to rework the different parts as needed, and to bolt on dedicated mobile apps later.<br />
<br />
<i>Web design</i> <br />
<br />
There's no design in the current holding page as I am no designer (frustratingly, but that's a whole other career path), and we're still working out how to pull design talent into the whole shebang in a sustainable way. Richard has put me onto <a href="https://webflow.com/" target="_blank">webflow</a>, which maybe will get us started.<br />
<br />
My first learning of trying to find a freelance designer was that I need a "web designer" not just a "designer", being from the web world I hadn't appreciated the importance of the prefix and attracted all the wrong people.<br />
<br />
<i>Further reading...</i><br />
<br />
Having this startup has encouraged me to broaden my reading and listening habits further. Here's some of things I've been catching up with:<br />
<ul>
<li><a href="https://youtu.be/jwG_qR6XmDQ" target="_blank">Regret minimization vid</a> - inspiration from Bezos</li>
<li><a href="http://www.bloomberg.com/graphics/2015-paul-ford-what-is-code/" target="_blank">What is code</a> - explains what I do to the non-coders</li>
<li><a href="http://hanselminutes.com/506/todays-startup-accelerators-john-henry-from-cofound-harlem" target="_blank">HanselMinutes - Startup Accelerators</a> - a timely podcast show</li>
<li>The <a href="https://wpcurve.com/startupchat/" target="_blank">Startup Chat podcast</a> from WPCurve</li>
<li>Last year's <a href="http://www.entrepreneur.com/article/241085" target="_blank">startup resolutions</a> via the <a href="http://workinstartups.com/" target="_blank">work in startups</a> mailing list</li>
<li>Everything in <a href="http://leanstack.com/blog/" target="_blank">LeanStack's blog</a></li>
</ul>
--<br />
<br />
Please do drop me a line if you found this interesting in any way. <a href="mailto:tim@timwise.co.uk">tim@timwise.co.uk</a> works best for me. <br />
<br />
<br />Tim Abellhttp://www.blogger.com/profile/18329208508756809573noreply@blogger.com1tag:blogger.com,1999:blog-5082828566240519947.post-11517671324964974662015-10-28T14:01:00.000+00:002018-03-22T10:22:29.356+00:00Dealing with dodgy recruiter tacticsUpdated version of this on my new blog: <a href="https://blog.timwise.co.uk/recruiters/">https://blog.timwise.co.uk/recruiters/</a><br />
<br />
---<br />
<br />
So I'm back on the contractor market again, and while many recruiters try and be reasonable, there are enough out there using <a href="http://www.brandonsavage.net/why-recruiters-are-bad-for-your-career/" target="_blank">underhand tactics</a> to make life difficult and potentially jeopardise a good contract.<br />
<br />
The one I plan to tackle this time round is "multiple submission", this is where you end up with your cv landing on a client's desk from two different recruiters. I gather this can be the nail in the coffin of a contract even if the client was keen - who wants to be stuck in the middle of two recruiters fighting over the commission?!<br />
<br />
<h4>
Principles</h4>
<br />
The first step is simple, which is don't agree verbally or otherwise to be put forward without first finding out who the client is, and make sure you keep track of who sent your CV where. I find <a href="https://trello.com/timabell2/recommend" target="_blank">Trello</a> is a good tool for keeping on top of the fast moving and often fragmented information you get when hunting for contracts.<br />
<br />
Recruiters are often hesitant to pass on the client's name, and this is understandable as if you were to go round them then they'd lose their commission which is how they earn a living. Worse, if you let the name slip to another less scrupulous recruiter then they may try and get your CV in first themselves without asking and in doing so sour the deal for everyone. (They often fish for names with phrases like "<i>I need to know who else you've been submitted to in order to avoid duplication</i>" - this is a lie, you can manage this fine yourself.)<br />
<br />
To tackle this I recommend the following:<br />
<ul>
<li>Never share their client's name with anyone else, especially other recruiters; make it clear this is a point of principle.</li>
<li>Prove your integrity by politely refusing to tell recruiters who ask, they might have liked the name, but they will be more likely to trust you in the future for respecting the wishes of other recruiters.</li>
</ul>
So that's the easy bit which I've been doing for some time...<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://www.flickr.com/photos/tim_abell/21013910269/" target="_blank"><img alt="Picture of an otter's head poking up in the sea." border="0" height="192" src="https://c2.staticflickr.com/6/5769/21013910269_433c52303f.jpg" title="" width="320" /></a></div>
<br />
<h4>
Technical measures</h4>
<br />
There are unfortunately a bunch of particularly unscrupulous recruiters out there like sharks in the water who will without your permission, or possibly without ever contacting you, send your CV to their "client" (or just some poor manager they've found to spam with CVs). You can't tell them not to if they've never asked you, and it can still ruin a deal. So what to do about that?<br />
<br />
If you're looking for contract work, you really need good exposure, so having your CV all over the place like leaves in the wind is not a bad way of getting the word out there (bear in mind I'm looking for work for my contracting company, which is a different ball-game to finding that perfect permanent role). It's actually pretty hard to control at all if you're dealing with recruiters because as soon as you include your CV in a response to posting on <a href="http://www.jobserve.com/" target="_blank">JobServe</a> it'll be dropped straight into that recruiter's pool of CVs, and some recruiters even pool CVs between them using services like <a href="http://www.iprofileuk.com/" target="_blank">iProfileUK</a>.<br />
<br />
My plan of action is this: having just brushed up my CV, it will contain the following text (as does <a href="https://www.linkedin.com/in/timabell" target="_blank">my LinkedIn profile</a>):<br />
<blockquote class="tr_bq">
Recruiters: this CV is not authorised for distribution to your clients. Please contact me for permission to represent me and for a separate copy containing an authorisation code & gpg signature. Thanks. To prospective clients, if you receive my CV without these then I haven't given permission to be represented.</blockquote>
Okay, so far so good, but any unscrupulous recruiter could just strip that out and send it anyway, and how would I be able to make a client comfortable that they can tell this scumbag to jog on?<br />
<br />
So before I agree to be represented by a particular recruiter to a particular client (which I have no particular objection to if they've found work I otherwise couldn't have found), I will be needing the client's name. I will add this to a list of who has authorization to send my CV where; I will then generate a customised CV (via mail merge) with explicit permission to represent me to this specific client included in it, and a note that any CVs received without this are unauthorized by me.<br />
<br />
To prevent a recruiter cottoning on and just generating this themselves I will then be gpg signing the result, which can then be checked against my public key, proving that it did indeed come from me (assuming my pc hasn't been hacked of course but I haven't heard of any recruiters going that far, if they could they'd probably be security consultants instead of recruiters!). <br />
<h4>
My public key</h4>
<br />
My current public key for <i>tim@timwise.co.uk</i> is available on the public keyservers, or you can download it: <a href="https://www.dropbox.com/s/2abgnkfff4gceru/Tim%20Abell%20tim%40timwise.co.uk%20%280x28CDF8EA%29%20pub.asc.txt?dl=0" target="_blank">my public key on dropbox</a>. Primary key fingerprint: 74D4 2A4C 9055 07C5 4A7E 3C9C 26C6 E087 <b>28CD F8EA</b>.<br />
<br />
<h4>
Technical details</h4>
Using libreoffice calc, codes are generated with the following:<br />
<br />
A cell containing allowable characters in the codes as text: 0123ABCDEF etc for this example this is in cell "F1".<br />
<br />
A row for each authorized representation containing this formula to generate a unique authorisation code: =CONCATENATE(<span style="color: #783f04;">MID($F$1,RANDBETWEEN(1,LEN($F$1)),1)</span>, <i>[repeat the "mid" clause once for each digit of the code to be generated]</i> )<br />
<br />
There's then another concatenation cell to generate the message to add to the CV. This is then copy-pasted into a file, and signed with gnupg on the command-line of my linux box. Here you can see the signing happening, followed by verification that the file is signed properly (as the client might do if they suspect a recruiter is reusing my CV for without my permission).<br />
<br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: xx-small;">$ ./sign.sh</span></span><span style="font-family: "courier new" , "courier" , monospace;"></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: xx-small;">#!/bin/sh -v</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: xx-small;">gpg --clearsign authorization.txt<br /><br />You need a passphrase to unlock the secret key for<br />user: "Tim Abell <tim@timwise.co.uk>"<br />4096-bit RSA key, ID 28CDF8EA, created 2015-01-20</span></span></blockquote>
<blockquote>
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-size: xx-small;">$ ./verify.sh <br />#!/bin/sh -v<br />gpg --verify authorization.txt.asc<br />gpg: Signature made Thu 29 Oct 2015 01:02:52 GMT using RSA key ID 28CDF8EA<br />gpg: Good signature from "Tim Abell <tim@timwise.co.uk>"<br />gpg: WARNING: This key is not certified with a trusted signature!<br />gpg: There is no indication that the signature belongs to the owner.<br />Primary key fingerprint: 74D4 2A4C 9055 07C5 4A7E 3C9C 26C6 E087 28CD F8EA</span></span></blockquote>
the contents of the signed file is then copy-pasted onto the end of a CV and sent off to the recruiter to relay to their client.<br />
<h4>
Examples</h4>
I've uploaded a couple of files for you to try out verifying, one with the original message, and one with a forged message where the client's name has been changed. See if you can figure out which is which:<br />
<ul>
<li><a href="https://www.dropbox.com/s/ycr0x9gruzjxlch/authorization1.txt?dl=0" target="_blank">authorization1</a></li>
<li><a href="https://www.dropbox.com/s/mlzyk3dd406dkqu/authorization2.txt?dl=0" target="_blank">authorization2</a></li>
</ul>
Here's an example signed authorization with a valid signature for the end of my CV (mail merge fields in bold):<br />
<blockquote class="tr_bq">
<span style="font-size: xx-small;"><span style="font-family: "courier new" , "courier" , monospace;">-----BEGIN PGP SIGNED MESSAGE-----</span></span><br />
<span style="font-size: xx-small;"><span style="font-family: "courier new" , "courier" , monospace;">Hash: SHA1</span></span><br />
<span style="font-size: xx-small;"><span style="font-family: "courier new" , "courier" , monospace;"></span></span><br />
<span style="font-size: xx-small;"><span style="font-family: "courier new" , "courier" , monospace;">Tim Abell has given permission for <b>Test Recruiter Ltd</b> to pass on this CV to <b>Some Client</b> on <b>28 Oct 2015</b>; auth code <b>662QP93XP4</b>. Any copies of my CV received without a valid signature have not been authorized for distribution.</span></span><br />
<span style="font-size: xx-small;"><span style="font-family: "courier new" , "courier" , monospace;">-----BEGIN PGP SIGNATURE-----</span></span><br />
<span style="font-size: xx-small;"><span style="font-family: "courier new" , "courier" , monospace;">Version: GnuPG v1</span></span><br />
<span style="font-size: xx-small;"><span style="font-family: "courier new" , "courier" , monospace;"></span></span><br />
<span style="font-size: xx-small;"><span style="font-family: "courier new" , "courier" , monospace;">iQIcBAEBAgAGBQJWMXA8AAoJECbG4IcozfjqtKYP/0DGQBU64kRsAqmnkpRkJEIo</span></span><br />
<span style="font-size: xx-small;"><span style="font-family: "courier new" , "courier" , monospace;">5gu1RVvozLE1AjE+/l7cq3LHo9jr3FUeigFD+DRcxVnfUT4pmyWHJYaqiYkm6MFf</span></span><br />
<span style="font-size: xx-small;"><span style="font-family: "courier new" , "courier" , monospace;">dx/3DAwj9g1sUOr4Ef0CN3MuSiP0HqrNanRCao0qxvCw9GJlKO+vTJlo8ZZMt+V0</span></span><br />
<span style="font-size: xx-small;"><span style="font-family: "courier new" , "courier" , monospace;">ImNxAIwjwKKLTvaLc7nxAlyjS8ZVuykBO5BTu5NnP4oDD359g1MEa6wI61et6bmj</span></span><br />
<span style="font-size: xx-small;"><span style="font-family: "courier new" , "courier" , monospace;">jvQiSQpqJnHxs+EN1QvrkVuDLZUT2OOQxwnKJV3WfI87YBuaMH/Eguor5NIQvnXT</span></span><br />
<span style="font-size: xx-small;"><span style="font-family: "courier new" , "courier" , monospace;">Z0vm5WbVgbadvpL5MP722EiNx+Ab4VCPJmEkrarH24em8f+JbZsvU753rZ4zgbOO</span></span><br />
<span style="font-size: xx-small;"><span style="font-family: "courier new" , "courier" , monospace;">TtO71Bn2DtjvgT6cVEytDbpJcl0pAhCjbSYkFCXOQYeP9lcBopbdTJ6nRcFcFEFK</span></span><br />
<span style="font-size: xx-small;"><span style="font-family: "courier new" , "courier" , monospace;">wlMcf+Cw/9WnYwyPMaWJi2zggJjLoWX2vRV5yUVa7y92pi9Fi2ow6Cru8WgXz/WW</span></span><br />
<span style="font-size: xx-small;"><span style="font-family: "courier new" , "courier" , monospace;">FMqOTDdRcYbDWCcDT7vc3oW0yfIkaCxnSm1jcg+/VUr1X/9zuNxcV+qRPUJ15fYR</span></span><br />
<span style="font-size: xx-small;"><span style="font-family: "courier new" , "courier" , monospace;">ii+cw/hIEqxn0tr+6eUsDmKdmS87PGGpo0wlGf3z7peytITIPf9y8bs2+N8ok6kA</span></span><br />
<span style="font-size: xx-small;"><span style="font-family: "courier new" , "courier" , monospace;">8IXtZXqzYO3qnaIw2JUQidm/0zQ8xz4UNsSrqN2ZsxDtqGeDgHAn7+yFH7dvfTTV</span></span><br />
<span style="font-size: xx-small;"><span style="font-family: "courier new" , "courier" , monospace;">ndYHkrMcYt1Yn5AmIsgZ</span></span><br />
<span style="font-size: xx-small;"><span style="font-family: "courier new" , "courier" , monospace;">=tFS7</span></span><br />
<span style="font-size: xx-small;"><span style="font-family: "courier new" , "courier" , monospace;">-----END PGP SIGNATURE-----</span></span></blockquote>
<br />Tim Abellhttp://www.blogger.com/profile/18329208508756809573noreply@blogger.com2tag:blogger.com,1999:blog-5082828566240519947.post-18118647811133788642015-10-27T14:45:00.000+00:002015-10-27T14:45:10.514+00:00Sql Data Viewer - preview releaseHello dear readers,<br />
<br />
I've started working on a data brower for relational databases that allows you to click through ids with foreign-keys to get around.<br />
<br />
Take a look at <a href="http://www.timwise.co.uk/sdv/">http://www.timwise.co.uk/sdv/</a> and if you think you might be interested then please do sign up to my <a href="http://eepurl.com/bDGPjf" target="_blank">mailing list</a>, and let me know if you have any feedback.<br />
<br />
This started as a holiday exercise in learning google's go programming language, but is intended to become a fully-fledged software product available to buy.<br />
<br />
TimTim Abellhttp://www.blogger.com/profile/18329208508756809573noreply@blogger.com0tag:blogger.com,1999:blog-5082828566240519947.post-8753013860321211022015-08-12T19:01:00.004+00:002016-11-15T11:49:21.321+00:00100 reasons I hate ssrsA slightly tongue-in cheek hit-list of nasty things and vague hand-waving opinions on what makes microsoft's sql server reporting services (ssrs) such a pig to work with.<br />
<br />
I don't really know of anything better so this is mostly just pointless ranting; but I'll justify it to myself by saying at least you'll know what you're getting into if you've read this before you start. SSRS seems to be more "death by one thousand paper cuts" than completely broken, so it's not so easy to say "it's shit, shalln't use it" like any good prima-donna developer would. Sorry I mean rock-star (recruiter speak). It also offers a few features that would be pretty hard to code from hand cost-effectively in something like asp.net mvc, such as user editing, multiple export formats, scheduled emails, and some of the ways you can cut-and-shut the data in the reports.<br />
<br />
I make no apologies for the colourful language, it's a representation of the emotional side of having to use this heap of crap. <br />
<br />
<br />
<ol>
<li><a href="http://www.allenkinsel.com/archive/2013/01/adventures-in-ssrs">http://www.allenkinsel.com/archive/2013/01/adventures-in-ssrs </a></li>
<li>doesn't bind to a port like a normal fukcing service</li>
<ol>
<li><a href="http://blogs.devhorizon.com/reza/2008/10/20/say-goodbye-to-iis-say-hello-to-httpsys/">http://blogs.devhorizon.com/reza/2008/10/20/say-goodbye-to-iis-say-hello-to-httpsys/</a></li>
<li><a href="http://www.iis.net/learn/get-started/introduction-to-iis/introduction-to-iis-architecture#Hypertext">http://www.iis.net/learn/get-started/introduction-to-iis/introduction-to-iis-architecture#Hypertext</a></li>
<li><a href="https://social.technet.microsoft.com/Forums/sqlserver/en-US/f2586aca-78fe-40d6-9bcd-5151bac7136f/role-of-httpsys-in-ssrs-2008-?forum=sqlreportingservices">https://social.technet.microsoft.com/Forums/sqlserver/en-US/f2586aca-78fe-40d6-9bcd-5151bac7136f/role-of-httpsys-in-ssrs-2008-?forum=sqlreportingservices</a></li>
<li><a href="http://blogs.technet.com/b/andrew/archive/2007/12/04/sql-server-2008-reporting-services-no-longer-depends-on-iis.aspx">http://blogs.technet.com/b/andrew/archive/2007/12/04/sql-server-2008-reporting-services-no-longer-depends-on-iis.aspx</a></li>
<li>http server api (aka http.sys)</li>
</ol>
<ol><ol>
<li><a href="https://msdn.microsoft.com/en-us/library/aa364510%28VS.85%29.aspx?f=255&MSPPError=-2147217396">https://msdn.microsoft.com/en-us/library/aa364510%28VS.85%29.aspx?f=255&MSPPError=-2147217396</a></li>
</ol>
<li>list reservations:</li>
<ol>
<li>`netsh http show urlacl`</li>
</ol>
</ol>
<li>auth in reporting <a href="https://msdn.microsoft.com/en-us/library/ms152899.aspx">https://msdn.microsoft.com/en-us/library/ms152899.aspx</a></li>
<li>reports in VS</li>
<ol>
<li><a href="http://curah.microsoft.com/22200/create-ssrs-reports-using-visual-studio">http://curah.microsoft.com/22200/create-ssrs-reports-using-visual-studio</a></li>
<li><a href="https://msdn.microsoft.com/en-us/library/ms173745.aspx">https://msdn.microsoft.com/en-us/library/ms173745.aspx</a></li>
</ol>
<li>"Explicity add new role assingment for the account you are using and check every box in sight" ~ a.n. colleague. lol</li>
<li>ignore the .rdl.data files with git.</li>
<ol>
<li><a href="http://stackoverflow.com/questions/3424928/in-ssrs-is-there-a-way-to-disable-the-rdl-data-file-creation#3425429">http://stackoverflow.com/questions/3424928/in-ssrs-is-there-a-way-to-disable-the-rdl-data-file-creation#3425429</a></li>
</ol>
<li>no folders.</li>
<ol>
<li><a href="https://connect.microsoft.com/SQLServer/feedback/details/487106/allow-sub-folders-in-ssrs-projects">https://connect.microsoft.com/SQLServer/feedback/details/487106/allow-sub-folders-in-ssrs-projects</a></li>
<li><a href="http://stackoverflow.com/questions/3309002/visual-studio-for-ssrs-2008-how-to-organize-reports-into-subfolders-in-solutio">http://stackoverflow.com/questions/3309002/visual-studio-for-ssrs-2008-how-to-organize-reports-into-subfolders-in-solutio</a></li>
</ol>
<li>renamed a dataset, nothing fucking broke!!!!!!!!!!!!!!!!!!!!!!!!!!! even though there are reports that depend on it. On editing the report's dataset list you can see clearly "not found", but yet it still runs. what in the blazes is that all about?</li>
<ol>
<li>caching in the report editor <a href="http://stackoverflow.com/q/3424928/10245">http://stackoverflow.com/q/3424928/10245</a></li>
<li>kill the .data cache files <a href="http://stackoverflow.com/questions/3424928/in-ssrs-is-there-a-way-to-disable-the-rdl-data-file-creation">http://stackoverflow.com/questions/3424928/in-ssrs-is-there-a-way-to-disable-the-rdl-data-file-creation</a></li>
<li>git clean -xfd</li>
<li>fuck</li>
<li><a href="https://social.msdn.microsoft.com/Forums/sqlserver/en-US/0aa81692-352f-4c1f-a0e3-95fe6c0797ca/cachedataforpreview-in-rsreportdesignerconfig-not-honored">https://social.msdn.microsoft.com/Forums/sqlserver/en-US/0aa81692-352f-4c1f-a0e3-95fe6c0797ca/cachedataforpreview-in-rsreportdesignerconfig-not-honored</a></li>
<li><a href="https://connect.microsoft.com/SQLServer/feedback/details/468482">https://connect.microsoft.com/SQLServer/feedback/details/468482</a></li>
<li>it's the `bin\` folder, not the .data files. Still, fuckkkk.</li>
</ol>
<li>to get from a report to a db you go, report > report dataset > shared dataset > db, but db is defined in the shared dataset with another name, which can be pointed to a shared data source, which is also named. and *that* data source actually has a connection string</li>
<li>committing to tfs failed half way through because vs had locked a bunch of files I didn't even have open</li>
<li>found a param with <Value>=Microsoft.VisualBasic.Strings.Join(Parameters!Stages.Label, ", ")</Value> - wtf.</li>
<li>function overload matching warning wouldn't go away till I closed the sln</li>
<li>localisation is a bitch</li>
<ol>
<li><a href="http://stackoverflow.com/questions/10953629/how-to-change-ssrs-2008-locale">http://stackoverflow.com/questions/10953629/how-to-change-ssrs-2008-locale</a> etc</li>
<li><a href="http://blog.ponytailbob.com/2007/10/multi-language-tips-in-ssrs.html">http://blog.ponytailbob.com/2007/10/multi-language-tips-in-ssrs.html</a></li>
<li><a href="http://blogs.msdn.com/b/sriram_reddy1/archive/2012/01/09/localization-in-ssrs-reports.aspx">http://blogs.msdn.com/b/sriram_reddy1/archive/2012/01/09/localization-in-ssrs-reports.aspx</a></li>
<li><a href="https://support.microsoft.com/en-gb/kb/919153">https://support.microsoft.com/en-gb/kb/919153</a></li>
<li><a href="http://www.keepitsimpleandfast.com/2011/09/localization-of-your-ssrs-reports.html">http://www.keepitsimpleandfast.com/2011/09/localization-of-your-ssrs-reports.html</a></li>
<li>why you no use User!Language??</li>
</ol>
<li>Visual Studio 2013 crashed. hard. while cancelling new report param</li>
<li>adds 00:00:00 to date fields from sql server. duuuuuuuuuuuuh (goes via .net datetime internally, but even so, not friendly)</li>
<li>changed date format, looks fine in VS, but no change in report server. wuh? deploy all</li>
<li>no auto-sizing of cols <a href="http://stackoverflow.com/questions/7851045/ssrs-tablix-column-cangrow-property-for-width">http://stackoverflow.com/questions/7851045/ssrs-tablix-column-cangrow-property-for-width</a></li>
<li>no nulls in multi-value <a href="http://www.keepitsimpleandfast.com/2012/03/how-to-pass-null-value-to-multi-value.html">http://www.keepitsimpleandfast.com/2012/03/how-to-pass-null-value-to-multi-value.html</a></li>
<li>need dirty hack to show "all" rather than full list</li>
<ol>
<li><a href="http://www.mssqltips.com/sqlservertip/2844/working-with-multiselect-parameters-for-ssrs-reports/">http://www.mssqltips.com/sqlservertip/2844/working-with-multiselect-parameters-for-ssrs-reports/</a></li>
<li><a href="http://stackoverflow.com/questions/12917261/optional-multi-valued-parameters-in-ssrs">http://stackoverflow.com/questions/12917261/optional-multi-valued-parameters-in-ssrs</a></li>
<li><a href="http://www.bi-rootdata.com/2012/09/efficient-way-of-using-all-as-parameter.html">http://www.bi-rootdata.com/2012/09/efficient-way-of-using-all-as-parameter.html</a></li>
<li><a href="http://blog.ponytailbob.com/2007/10/2-shortcomings-of-multi-valued.html">http://blog.ponytailbob.com/2007/10/2-shortcomings-of-multi-valued.html</a></li>
</ol>
<li>some fucking horror I've yet to encounter (querystrings) <a href="http://stackoverflow.com/questions/512105/passing-multiple-values-for-a-single-parameter-in-reporting-services">http://stackoverflow.com/questions/512105/passing-multiple-values-for-a-single-parameter-in-reporting-services</a></li>
<li>it has a fucking canvas size that will push over to 2 pages</li>
<li>the font kerning on a print is massively different to on web / design view</li>
<li>sorting</li>
<ol>
<li><a href="http://stackoverflow.com/questions/9254604/why-does-my-sql-server-reporting-service-ssrs-report-appear-to-re-sort-the-d">http://stackoverflow.com/questions/9254604/why-does-my-sql-server-reporting-service-ssrs-report-appear-to-re-sort-the-d</a></li>
</ol>
<li>"Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index " from editing xml. thanks for the error info. fuckkkkkers</li>
<li>the ssrs gui editor is a flaky piece of shit</li>
<ol>
<li>doesn't select the right fucking textbox in the props window</li>
<li>had to restart visual fuckigjn studio</li>
<li>grrr</li>
</ol>
<li>the underlying xml is fucking horrific</li>
<li><rd:Selected>true</rd:Selected> ----- what in the fucking blazes is that doing in there?</li>
<li>how do you deploy without connecting visual studio to production server? you fucking don't hahahahahaa</li>
<li>powerhell <a href="https://gist.github.com/timabell/7e3019bd2de802f0b259">https://gist.github.com/timabell/7e3019bd2de802f0b259</a></li>
<li>ssbi install croaked - h<a href="ttps://support.microsoft.com/en-us/kb/2800050?wa=wsignin1.0">ttps://support.microsoft.com/en-us/kb/2800050?wa=wsignin1.0</a></li>
<li>[09:44:53] john doe: Tim can I have a .bak file of ReportServer$MSSQL2012TempDB which the stupid software seems to be unable to operate without even though it has Temp in the database name implying it will rebuild itself (at least that's what it implies to me)</li>
<ol>
<li>[09:47:48] Tim Abell: (facepalm)</li>
<li>[09:47:49] Tim Abell: sure</li>
<li>[09:48:08] Tim Abell: I did wonder, and then I thought, no they couldn't possibly need that</li>
</ol>
<li>dropdown doesn't work in firefox</li>
<li>no debugging <a href="http://stackoverflow.com/a/14068447/10245">http://stackoverflow.com/a/14068447/10245</a></li>
<li>Warning : The text box ‘appliedFilters’ and the image ‘urLogo’ overlap. Overlapping report items are not supported in all renderers.</li>
<li>the only options for DRY in reports suck balls <a href="http://www.3pillarglobal.com/insights/tips-tricks-ensure-consistency-sql-server-reporting-services-reports">http://www.3pillarglobal.com/insights/tips-tricks-ensure-consistency-sql-server-reporting-services-reports</a></li>
<li><a href="http://harmful.cat-v.org/software/xml/">http://harmful.cat-v.org/software/xml/</a> xml is a terrible format anyway</li>
<li>layout is in inches</li>
<li>you can change the layout to cm</li>
<li>it stores different metrics (cm/in) for each element, wtf, pick a unit</li>
<li>reflowing nicely is impossible</li>
<li>layout engine is as intelligent as a piece of paper and a pen. x,y is all you get.</li>
<li><a href="http://www.webapplicationsuk.com/2010/07/word-html-renderer-ndash-the-road-to-hellhellip/">http://www.webapplicationsuk.com/2010/07/word-html-renderer-ndash-the-road-to-hellhellip/</a></li>
<li><a href="https://connect.microsoft.com/SQLServer/feedback/details/540183/supported-rdl-object-model-rdlom">https://connect.microsoft.com/SQLServer/feedback/details/540183/supported-rdl-object-model-rdlom</a></li>
<li>this is the kind of bullshit that counts for helpful content on the net <a href="https://social.msdn.microsoft.com/Forums/en-US/86205ca4-13d0-4ca6-84f1-79797616f0f4/exclude-null-values-from-sum-and-avg-calculation?forum=sqlreportingservices">https://social.msdn.microsoft.com/Forums/en-US/86205ca4-13d0-4ca6-84f1-79797616f0f4/exclude-null-values-from-sum-and-avg-calculation?forum=sqlreportingservices</a> - =sum(forum_format * quality_of_community) = errorrrrrrrrr</li>
<li>multiple rdl xml schema in the same fucking project, completely different xml structure</li>
<ol>
<li>2005 generated with "new report wizard" in VS 20-fucking-13: <Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2005/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner"></li>
<li>2008 <Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner"></li>
<li>2009 from https://technet.microsoft.com/en-us/library/cc627465%28v=sql.105%29.aspx - <Report xmlns:rd=http://schemas.microsoft.com/SQLServer/reporting/reportdesigner xmlns="http://schemas.microsoft.com/sqlserver/reporting/2009/01/reportdefinition"></li>
<li>2010 <Report xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner" xmlns:cl="http://schemas.microsoft.com/sqlserver/reporting/2010/01/componentdefinition" xmlns="http://schemas.microsoft.com/sqlserver/reporting/2010/01/reportdefinition"></li>
<li>how many fucking versions??!</li>
<li><a href="http://stackoverflow.com/questions/15539859/what-is-the-difference-between-rdl-2008-schema-and-rdl-2010-schema-feature-wise">http://stackoverflow.com/questions/15539859/what-is-the-difference-between-rdl-2008-schema-and-rdl-2010-schema-feature-wise</a></li>
<li><a href="http://stackoverflow.com/questions/9974179/is-there-a-new-version-of-rdl-schema-for-sql-server-2012-denali">http://stackoverflow.com/questions/9974179/is-there-a-new-version-of-rdl-schema-for-sql-server-2012-denali</a></li>
<li><a href="http://stackoverflow.com/questions/29951653/ssrs-2008r2-visual-studio-2008-and-2008-and-2010-schemas">http://stackoverflow.com/questions/29951653/ssrs-2008r2-visual-studio-2008-and-2008-and-2010-schemas</a> - how to not end up with old schema?!</li>
<li><a href="https://social.msdn.microsoft.com/Forums/sqlserver/en-US/f4d14548-c592-4d8d-8185-ca683c421649/2010-schema-with-visual-studio-2010?forum=sqlreportingservices">https://social.msdn.microsoft.com/Forums/sqlserver/en-US/f4d14548-c592-4d8d-8185-ca683c421649/2010-schema-with-visual-studio-2010?forum=sqlreportingservices</a></li>
</ol>
<li>how do you upgrade a report schema? install a massive chunk of fucking sql server <a href="http://stackoverflow.com/questions/13170608/upgrade-my-rdlc-schema-from-2008-01-to-2010-01">http://stackoverflow.com/questions/13170608/upgrade-my-rdlc-schema-from-2008-01-to-2010-01</a></li>
<li>[17:54:48] john doe: Btw have you noticed that in Print Layout view the header doesn't expand if any of the textboxes have auto-grown? [17:55:14] Tim Abell: that's because ssrs is a piece of shit from 1990 [17:55:28] Tim Abell: and it thinks A4 is the ultimate display format [17:55:47] Tim Abell: you just have to guess how much space you'll need</li>
<li>the ordering of the xml in the proj file is unstable causing diff noise</li>
<li>subreports, icky <a href="http://bhushan.extreme-advice.com/subreport-in-ssrs/">http://bhushan.extreme-advice.com/subreport-in-ssrs/</a></li>
<ol>
<li>or nested tables <a href="http://stackoverflow.com/questions/11335655/filtering-nested-data-regions-in-ssrs">http://stackoverflow.com/questions/11335655/filtering-nested-data-regions-in-ssrs</a></li>
</ol>
<li>some things can only be achieved with subreports, and they have to be deployed separately from the main report, meaning they can get out of sync. enjoy the fear of not knowing if you'll break something else when you upload your new version of the subreport you depend on</li>
<li>no support for "time" data type <a href="http://stackoverflow.com/questions/3846378/displaying-time-in-reporting-services-2008">http://stackoverflow.com/questions/3846378/displaying-time-in-reporting-services-2008</a></li>
<li>The "View Report" button next to the parameters when running a report in VS is *always* greyed-out, even though it actually works.</li>
<li>wow that's mental, hidden reports show in details view and not in tile view in the ssrs web ui</li>
<li>the report editor has a copy option for report items, but no paste, so you can't duplicate reports</li>
<ol>
<li>actually you can, but only if you know the keyboard shortcuts. 0_o - ctrl-c ctrl-v </li>
</ol>
<li>duplicating a report on the filesystem, and then using "add existing item" to include it puts it at the end of the list... until you rename it and then it's moved into alphabetical order causing a spurious diff. should have put in the right place in the first place. grr.</li>
<li>using the cursor keys to move textboxes around is so laggy that I overshoot every single time</li>
<li>the editor popups in visual studio are modal, so you can't refer to anything else</li>
<li>and there's no maximise button so you have to drag the fiddly border to make it bigger</li>
<li>the report editor hasn't heard of ctrl-c or ctrl-v, have to use ctrl-Ins / shift-Ins instead</li>
<li>border rendering / precedence is a fucking mess. set some borders, your report will look like a two-year-old coloured it in, and how it looks changes depending on the zoom level.</li>
<li>you have to use VB to do alternate row colours - <a href="http://stackoverflow.com/questions/44376/add-alternating-row-color-to-sql-server-reporting-services-report">http://stackoverflow.com/questions/44376/add-alternating-row-color-to-sql-server-reporting-services-report</a></li>
<li>if anything goes wrong with an expression all you get is "#Error". Helpful. E.g. <a href="http://stackoverflow.com/q/9144312/10245">http://stackoverflow.com/q/9144312/10245</a></li>
<li>this one time, at band camp, I edited a report definition in VS and it refused to save the new definition to disk (ctrl-shift-s, ctrl-shift-s!!). wtf. Restarted VS and all the changes were gone.</li>
<li>report editor silently adds new parameters to the report when you add new parameters to the sql. seriously. fuck off.</li>
<li>RSI-inducing UI for editing the reports. click click click clickity click</li>
<li>the sql editor has only a single undo. like ye olde notepad.</li>
<li>in the editor, you can right-click copy, you can't right-click paste. wtf. ctrl-v does paste though. wtf again. I know, I already said it, but it's reaaaaaly shit</li>
<li>the field list on a dataset is ordinal, allowing you to mismatch the select in the sql from the list of fields in the dataset and not notice</li>
<li>how do you align a textbox on the page?<br /> <Top>0.82546cm</Top><br /> <Left>0.07309cm</Left><br /> <Height>0.88964cm</Height><br /> <Width>2.3025cm</Width><br />fuck you!!!!</li>
<li>one goddam cell in the underlying format:</li>
</ol>
<TablixCell><br />
<CellContents><br />
<Textbox Name="qty"><br />
<CanGrow>true</CanGrow><br />
<KeepTogether>true</KeepTogether><br />
<Paragraphs><br />
<Paragraph><br />
<TextRuns><br />
<TextRun><br />
<Value>=Sum(Fields!qty.Value)</Value><br />
<Style /><br />
</TextRun><br />
</TextRuns><br />
<Style /><br />
</Paragraph><br />
</Paragraphs><br />
<rd:DefaultName>qty</rd:DefaultName><br />
<Style><br />
<Border><br />
<Color>LightGrey</Color><br />
<Style>None</Style><br />
</Border><br />
<PaddingLeft>2pt</PaddingLeft><br />
<PaddingRight>2pt</PaddingRight><br />
<PaddingTop>2pt</PaddingTop><br />
<PaddingBottom>2pt</PaddingBottom><br />
</Style><br />
</Textbox><br />
</CellContents><br />
</TablixCell><br />
<br />
Contributed (thanks, a nice surprise!):<br />
<br />
71. Report width limited to 455in (even if I'm hiding columns using parameters against the Visibility column filter).<br />
72. NO DYNAMIC COLUMN CREATION (ridiculous!)<br />
73.
Selection of multiple columns and setting attributes is ridiculously
flaky. This is because I wanted to reduce the column width and font to
comply with Point 71 !!<br />
74. We have to restart Reporting Server services frequently or our charts won't show up. Eh?<br />
75. Cut and paste columns? Nope!<br />
<br />
More recent things:<br />
<br />
76. Disappearing "Report Data" menu: <a href="http://stackoverflow.com/a/28883272/10245">http://stackoverflow.com/a/28883272/1024</a><br />
77. SSDT for VS2015 upgrades reports to 2016 schema as soon as they're opened (WAT?!) and ignores the TargetServerVersion being set to <=2014 <a href="http://stackoverflow.com/questions/37816216/deploy-of-a-report-with-ssdt-2016-generates-error">http://stackoverflow.com/questions/37816216/deploy-of-a-report-with-ssdt-2016-generates-error</a> what if we haven't upgraded our production server, hmmm?<br />
78. Okay so when you run a build, VS2015 then <b>downgrades</b> the rdl to the right schema to match the project's target server version before putting it in the build folder. What could possssssibly go wrong. 0_o Complexity++ <br />
79. Install SSRS in only 41 easy steps <a href="https://thecodeattic.wordpress.com/category/ssrs/">https://thecodeattic.wordpress.com/category/ssrs/</a><br />
80. Build > "Skipping 'SomeReport.rdl'. Item is up to date." - No it isn't, I've deleted it from the friggin bin folder. So clearly it has some stupid cache of what's it thinks is on disk rather than, oh I don't know fucking checking the disk. Sheesh. If it's that optimized why is everything still so damn slow?!<br />
81. Building a project with lots of reports is slow. Even if nothing changed.<br />
82. Intermittently get <i>"[rsInvalidReportDefinition] The definition of this report is not valid or supported by this version of Reporting Services. The report definition may have been created with a later version of Reporting Services, or contain content that is not well-formed or not valid based on Reporting Services schemas. Details: Data at the root level is invalid."</i> - I am not alone. <a href="https://connect.microsoft.com/SQLServer/feedback/details/2988044/randomly-get-rsinvalidreportdefinition-when-previewing-report">https://connect.microsoft.com/SQLServer/feedback/details/2988044/randomly-get-rsinvalidreportdefinition-when-previewing-report</a> - A rebuild fixes it for me, for a while at least.<br />
83. Sometimes when you edit an embedded dataset it completely fails to persist any of your changes to disk. And when you close the report they are lost. Handy. Thanks fuck for git.<br />
83. Assumes you've never heard of source control and creates numbered backups of report files (notably on auto-upgrade). Also has messages like "<i>delete will permanently delete this thing</i>" - no it won't I have source control; I wonder if the SSRS know what that is.<br />
84. I've never managed to crash VS2015 so many times in one day. Omg you didn't click there did you? I wasn't ready! *crash* ... *again*<br />
85. Change the files on disk and the preview window often doesn't notice<br />
86. Preview window silently fires a 'build' of the reports. Sometimes.<br />
87. Generates broken Shared-datasets <a href="http://stackoverflow.com/a/38753141/10245">http://stackoverflow.com/a/38753141/10245</a><br />
88. If you break the xml of a shared-dataset the <i>entire project</i> will fail to load. w-t-f.<br />
89. Renaming datasets etc just breaks everything rather than updating references.<br />
90. The .rptproj file has a <state> tag at the top which is base64 encode xml (WAT?! xml in xml. eerrrrr), which is information about source control (<i>arse-about-face or what! source code that controls the *source-control* [that controls the source, that controls the source-control that controls the source...]; even the words are circular!!</i>). In the base64 you'll find a <SourceControlInfo> tag.<br />
<br />
<Project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ToolsVersion="2.0"> <br />
<State>$base64$PFNvdXJjZUNvbnRyb2xJbmZvIHhtbG5zOnhzZD0iaHR0cDovL3d3dy53My5vcmcvMjAwMS9YTUxTY2hlbWEiIHhtbG5zOnhzaT0iaHR0cDovL3d3dy53My5vcmcvMjAwMS9YTUxTY2hlbWEtaW5zdGFuY2UiIHhtbG5zOmRkbDI9Imh0dHA6Ly9zY2hlbWFzLm1pY3Jvc29mdC5jb20vYW5hbHlzaXNzZXJ2aWNlcy8yMDAzL2VuZ2luZS8yIiB4bWxuczpkZGwyXzI9Imh0dHA6Ly9zY2hlbWFzLm1pY3Jvc29mdC5jb20vYW5hbHlzaXNzZXJ2aWNlcy8yMDAzL2VuZ2luZS8yLzIiIHhtbG5zOmRkbDEwMF8xMDA9Imh0dHA6Ly9zY2hlbWFzLm1pY3Jvc29mdC5jb20vYW5hbHlzaXNzZXJ2aWNlcy8yMDA4L2VuZ2luZS8xMDAvMTAwIiB4bWxuczpkZGwyMDA9Imh0dHA6Ly9zY2hlbWFzLm1pY3Jvc29mdC5jb20vYW5hbHlzaXNzZXJ2aWNlcy8yMDEwL2VuZ2luZS8yMDAiIHhtbG5zOmRkbDIwMF8yMDA9Imh0dHA6Ly9zY2hlbWFzLm1pY3Jvc29mdC5jb20vYW5hbHlzaXNzZXJ2aWNlcy8yMDEwL2VuZ2luZS8yMDAvMjAwIiB4bWxuczpkZGwzMDA9Imh0dHA6Ly9zY2hlbWFzLm1pY3Jvc29mdC5jb20vYW5hbHlzaXNzZXJ2aWNlcy8yMDExL2VuZ2luZS8zMDAiIHhtbG5zOmRkbDMwMF8zMDA9Imh0dHA6Ly9zY2hlbWFzLm1pY3Jvc29mdC5jb20vYW5hbHlzaXNzZXJ2aWNlcy8yMDExL2VuZ2luZS8zMDAvMzAwIiB4bWxuczpkZGw0MDA9Imh0dHA6Ly9zY2hlbWFzLm1pY3Jvc29mdC5jb20vYW5hbHlzaXNzZXJ2aWNlcy8yMDEyL2VuZ2luZS80MDAiIHhtbG5zOmRkbDQwMF80MDA9Imh0dHA6Ly9zY2hlbWFzLm1pY3Jvc29mdC5jb20vYW5hbHlzaXNzZXJ2aWNlcy8yMDEyL2VuZ2luZS80MDAvNDAwIiB4bWxuczpkZGw1MDA9Imh0dHA6Ly9zY2hlbWFzLm1pY3Jvc29mdC5jb20vYW5hbHlzaXNzZXJ2aWNlcy8yMDEzL2VuZ2luZS81MDAiIHhtbG5zOmRkbDUwMF81MDA9Imh0dHA6Ly9zY2hlbWFzLm1pY3Jvc29mdC5jb20vYW5hbHlzaXNzZXJ2aWNlcy8yMDEzL2VuZ2luZS81MDAvNTAwIiB4bWxuczpkd2Q9Imh0dHA6Ly9zY2hlbWFzLm1pY3Jvc29mdC5jb20vRGF0YVdhcmVob3VzZS9EZXNpZ25lci8xLjAiPg0KICA8RW5hYmxlZD50cnVlPC9FbmFibGVkPg0KICA8UHJvamVjdE5hbWU+U0FLPC9Qcm9qZWN0TmFtZT4NCiAgPEF1eFBhdGg+U0FLPC9BdXhQYXRoPg0KICA8TG9jYWxQYXRoPlNBSzwvTG9jYWxQYXRoPg0KICA8UHJvdmlkZXI+U0FLPC9Qcm92aWRlcj4NCjwvU291cmNlQ29udHJvbEluZm8+</State><br />
...<br /><br />
decoded "state" contents:<br />
<br />
<SourceControlInfo xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ddl2="http://schemas.microsoft.com/analysisservices/2003/engine/2" xmlns:ddl2_2="http://schemas.microsoft.com/analysisservices/2003/engine/2/2" xmlns:ddl100_100="http://schemas.microsoft.com/analysisservices/2008/engine/100/100" xmlns:ddl200="http://schemas.microsoft.com/analysisservices/2010/engine/200" xmlns:ddl200_200="http://schemas.microsoft.com/analysisservices/2010/engine/200/200" xmlns:ddl300="http://schemas.microsoft.com/analysisservices/2011/engine/300" xmlns:ddl300_300="http://schemas.microsoft.com/analysisservices/2011/engine/300/300" xmlns:ddl400="http://schemas.microsoft.com/analysisservices/2012/engine/400" xmlns:ddl400_400="http://schemas.microsoft.com/analysisservices/2012/engine/400/400" xmlns:ddl500="http://schemas.microsoft.com/analysisservices/2013/engine/500" xmlns:ddl500_500="http://schemas.microsoft.com/analysisservices/2013/engine/500/500" xmlns:dwd="http://schemas.microsoft.com/DataWarehouse/Designer/1.0"><br /> <Enabled>true</Enabled><br /> <ProjectName>SAK</ProjectName><br /> <AuxPath>SAK</AuxPath><br /> <LocalPath>SAK</LocalPath><br /> <Provider>SAK</Provider><br /></SourceControlInfo><br />
<br />
Enough xml namespaces for you? <br />
<br />
91. The state base64 changes all the time causing diff noise.<br />
<br />
<br />
I know I can't count, but if ssrs is going to make so little effort I don't see why I should. And to be honest "100" seemed a lot more like comic exaggeration when I titled my tomboy note which only had 5 or 6 grumblings in it, I wasn't actually expecting to get within spitting distance of the original number!<br />
<br />
<br />
Doesn't mean I won't use it again mind, just don't promise to like it.<br />
<br />
If you liked this, you might also like the ssrs deployment tool I sometimes look after: <a href="https://github.com/timabell/ssrs-powershell-deploy">https://github.com/timabell/ssrs-powershell-deploy</a> (mostly not my work, just pulled together a bunch of contributions). <br />
<br />
<br />Tim Abellhttp://www.blogger.com/profile/18329208508756809573noreply@blogger.com8tag:blogger.com,1999:blog-5082828566240519947.post-39785058484716589882015-01-12T22:31:00.002+00:002015-02-26T00:51:32.105+00:00LibreOffice mail merge - "data source 'SOURCE' was not found"So another year on, LibreOffice 4.2.7.2 (via Linux Mint 17.1) still has a dog's breakfast of a mail merge feature, hey ho, hopefully it might actually get fixed following the fork from OpenOffice and the change in contribution methods.<br />
<br />
Anyways<br />
<br />
So I've moved machines, copied my files across and for some reason my mail merge has soiled itself and now bleats <i>"data source 'SOURCE' was not found"</i> which is as unhelpful as it is infuriating, especially given that the "check connections" button is exactly the wrong place to look for an answer.<br />
<br />
Turns out you actually get this if even just a single field in your document is 'broken'. How do you tell which ones are broken? Well you have to change them all to just be sure. Sigh. <br />
<br />
The fix for me today was as follows (though with such a messy feature there's unlimited ways it can break):<br />
<br />
<ol>
<li>Hit F4 and check that your connection to the spreadsheet actually exists and works, and unbreak anything you find therein. While you're in there you can marvel at how it requires a whole other file (.odb) just to remember how to get to a spreadsheet. (See below for fixing this)</li>
<li>Turn on the field names so you can see what the f*** is actually going on with "<i>View > Field Names (ctrl+f9)</i>" which will show you the fully qualified field name, which might even be completely wrong. You can now see that for whatever reason (insanity?) it embeds more than just the field name at the field place-holder.</li>
<li>And finally the way you actually fix the broken fields it's failing to tell you about actually lies under the menu item "<i>Edit > Fields</i>", where you can change all the broken references one at a time to the correct place.</li>
<li>For bonus points, if it the field looks right but is silently broken somehow then you have to change the field to something else, hit okay, and then change it back again for anything to actually change, which is annoying if you have a lot of fields.</li>
</ol>
Fragile much?<br />
<br />
Another fix I've just discovered is you can rename your data source to match the name defined in the fields (assuming they're all the same) and it'll start working again.<br />
<h4>
Fixing the .odb file</h4>
If you're stuck on point 1, here's how you fix it, also completely non-obvious and full of apparent dead-ends and dubious information.<br />
<br />
<ol>
<li>Give up on trying to do this in writer, it doesn't seem possible, in spite of false hope from the data sources tool, it only allows you to select .odb (database) files, not spreadsheets.</li>
<li>Open up "libreoffice base", which pops open the database wizard</li>
<li>Choose "connect to an existing database"</li>
<li>In the dropdown choose "Spreadsheet"</li>
<li>Next</li>
<li>Browse for your spreadsheet</li>
<li>Next</li>
<li>Leave "register database for me" selected</li>
<li>Leave "open the database for editing" checked </li>
<li>Finish</li>
<li>It prompts to save the new database (.odb), I suggest saving it in the same folder as the spreadsheet to save future confusion.</li>
<li>You now have the database open in "base", you should see your spreadsheet sheets listed as tables</li>
<li>Open a table (i.e. a sheet) and check you can see the spreadsheet contents</li>
<li>Close "base", saving changes</li>
<li>Return to your writer document</li>
<li>Open the data sources again (F4), you should now be able to browse your spreadsheet via your newly created database.</li>
</ol>
<br />
Simpler than getting planning permission out of a vogon. :-/<br />
<br />
<br />
Hope that helps some other poor open source die-hard who has work to do.<br />
<br />
<br />
Useful refs:<br />
<ul>
<li><a href="http://davidmburke.com/2011/08/10/mail-merge-in-libreoffice/">http://davidmburke.com/2011/08/10/mail-merge-in-libreoffice/</a></li>
<li><a href="https://forum.openoffice.org/en/forum/viewtopic.php?f=30&t=29708">https://forum.openoffice.org/en/forum/viewtopic.php?f=30&t=29708</a></li>
<li><a href="https://www.libreoffice.org/bugzilla/buglist.cgi?quicksearch=mailmerge">https://www.libreoffice.org/bugzilla/buglist.cgi?quicksearch=mailmerge</a></li>
<li><a href="http://ask.libreoffice.org/en/question/19590/can-you-import-a-libreoffice-calc-spreadsheet-into-a-libreoffice-database/">http://ask.libreoffice.org/en/question/19590/can-you-import-a-libreoffice-calc-spreadsheet-into-a-libreoffice-database/</a> </li>
</ul>
Tim Abellhttp://www.blogger.com/profile/18329208508756809573noreply@blogger.com2tag:blogger.com,1999:blog-5082828566240519947.post-22916404922026100622014-05-10T10:23:00.000+00:002014-05-10T10:37:34.821+00:00throw vs throw ex vs wrap and throw in c-sharpI've come across the throw vs throw ex 'debate' a few times, even as an interview question, and it's always bugged me because it's never something I've worried about in my own c# code.<br />
<br />
<b>background</b><br />
<br />
So here's a typical example of the throw vs throw ex thing: <a href="https://stackoverflow.com/questions/730250/is-there-a-difference-between-throw-and-throw-ex">https://stackoverflow.com/questions/730250/is-there-a-difference-between-throw-and-throw-ex</a><br />
<br />
Basically it revolves around either messing up the line numbers in your stack trace (throw ex;) or losing an chunk of your stack entirely (throw;) - exception1 and 2 respectively in this nice clear answer <a href="http://stackoverflow.com/a/776756/10245">http://stackoverflow.com/a/776756/10245</a><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://secure.flickr.com/photos/tim_abell/13910043519/" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://farm8.staticflickr.com/7193/13910043519_39b8abfab9_n.jpg" /></a></div>
<br />
<b>the third option</b><br />
<br />
I've just figured out why.<br />
<br />
Because in my own code, whenever I catch and re-throw I <i>always</i> wrap another exception to add more context before rethrowing, and this means you don't have either of the above problems. For example:<br />
<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>private static void ThrowException3() {<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>try {<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>DivByZero(); // line 43<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>} catch (Exception ex) {<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>throw new Exception("doh", ex); // line 45<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>}<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>}<br />
<div>
<br /></div>
<div>
<div>
Exception 3:</div>
<div>
System.Exception: doh ---> System.DivideByZeroException: Division by zero</div>
<div>
at puke.DivByZero () [0x00002] in /home/tim/repo/puker/puke.cs:51 </div>
<div>
at puke.ThrowException3 () [0x00000] in /home/tim/repo/puker/puke.cs:43 </div>
<div>
--- End of inner exception stack trace ---</div>
<div>
at puke.ThrowException3 () [0x0000b] in /home/tim/repo/puker/puke.cs:45 </div>
<div>
at puke.Main (System.String[] args) [0x00040] in /home/tim/repo/puker/puke.cs:18 </div>
</div>
<div>
<br /></div>
<div>
Obviously 'doh' would be something meaningful about the state of that function ThrowException3 in the real world.</div>
<br />
Full example with output at <a href="https://gist.github.com/timabell/78610f588961bd0a0b95">https://gist.github.com/timabell/78610f588961bd0a0b95</a><br />
<br />
This makes life much easier when tracking down bugs / state problems later on. Particularly if you string.format() the new message and add some useful state info.Tim Abellhttp://www.blogger.com/profile/18329208508756809573noreply@blogger.com0tag:blogger.com,1999:blog-5082828566240519947.post-50555610570007693632014-03-08T19:07:00.000+00:002014-03-08T19:07:01.451+00:00Why publish open source when you are commercial?Why open source your commercial projects?<br />
<ul>
<li dir="ltr">Forces you to decouple them from other internal systems.</li>
<li dir="ltr">Encourages thinking in terms of reusable modules, which is better for internal reuse just as much as public reuse.</li>
<li dir="ltr">Possibility of contributions to systems useful to your business by others.</li>
<li dir="ltr">Easier reuse within your organisation (the public internet is a better search and sharing system than any internal systems).</li>
<li dir="ltr">Reputation advantages, the best coders often like to work in open and forward-thinking companies, and having public shared code is a great sign of such an organisation.</li>
</ul>
Do it early<br />
<ul>
<li dir="ltr">Preferably push your very first commit straight to github.</li>
<li dir="ltr">Do it before it has a chance to be tightly coupled to internal systems, otherwise you'll have to unpick it and it will be less decoupled from day one, and inertia might mean that in spite of the best intentions you then never publish it.</li>
<li dir="ltr">You'll have it in mind that every commit is public from day one, avoiding adding internal config etc and forcing you to factor it out into config which is all round a good thing.</li>
<li dir="ltr">Don't wait for your code to be perfect, there are compromises in all code and sharing something imperfect is better than sharing nothing.</li>
</ul>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://secure.flickr.com/photos/tim_abell/12293521763/"><img border="0" src="https://farm4.staticflickr.com/3756/12293521763_bfebeeaa41_n.jpg" /></a></div>
<div>
<br /></div>
<div>
Worried about the brand?</div>
<ul>
<li dir="ltr">Commit under personal email addresses and push to personal github accounts. You can always setup a corporate github account later when you are feeling more confident.</li>
</ul>
<br />
Of course I'm not saying you should open source everything, for example your core product's codebase should probably not go on github if you are a product company!<br />
<br />
--<br />
<br />
<i>Be brave, be open.</i><br />
Props to <a href="https://twitter.com/tomskitomski">Tom Loosemoore</a>Tim Abellhttp://www.blogger.com/profile/18329208508756809573noreply@blogger.com0tag:blogger.com,1999:blog-5082828566240519947.post-28192141993296216672014-02-10T18:33:00.000+00:002014-02-10T18:39:49.408+00:00Bash command line editing cheat sheet<a href="https://www.gnu.org/software/bash/manual/bashref.html#Readline-Interaction">https://www.gnu.org/software/bash/manual/bashref.html#Readline-Interaction</a><br />
<ul>
<li dir="ltr"><b>ctrl-a/e</b> start/end of line</li>
<li dir="ltr"><b>alt-f/b</b> forward/back a word</li>
<li dir="ltr"><b>ctrl-w/alt-d</b> delete to start/end of word</li>
<li dir="ltr"><b>ctrl-shift-_</b> undo (i.e. ctrl-underscore)</li>
<li dir="ltr"><b>ctrl-y</b> paste (yank) deleted text<br /><ul>
<li dir="ltr"><b>alt-y</b> paste older deleted text instead</li>
</ul>
</li>
<li dir="ltr">prefix with <b>alt+digit</b> (0-9) to do multiple, e.g. delete two words</li>
<ul>
<li dir="ltr">start with <b>alt-minus</b> to go backwards</li>
</ul>
</ul>
<div>
<br /></div>
<div>
Just a few notes I threw together for my own benefit. I finally got around to learning a bit more about editing commands on the Linux shell / terminal.<br />
<br /></div>
<div style="text-align: center;">
<a href="https://secure.flickr.com/photos/tim_abell/11937840106/"><img alt="" src="https://farm4.staticflickr.com/3808/11937840106_fcbbddf793_n.jpg" /></a></div>
Tim Abellhttp://www.blogger.com/profile/18329208508756809573noreply@blogger.com0tag:blogger.com,1999:blog-5082828566240519947.post-65988928979134947312014-02-03T20:27:00.000+00:002014-02-03T20:29:19.425+00:00Converting kml to gpx with pythonToday I wanted to geo-code some of my photos.<br />
<br />
I have an SLR digital camera (no gps of course), and an android phone. I recorded a track with <a href="https://play.google.com/store/apps/details?id=com.google.android.maps.mytracks">My Tracks</a> from google on the phone. (Not entirely recommended but works). I then fired up digikam to run the geo-correlation and add lat-long to the exif of the files only to discover <a href="http://community.kde.org/Digikam/GSoC2010/ReverseGeocoding#TODO_Later_versions">digikam doesn't know how to read kml</a>. Fooey.<br />
<br />
<div style="text-align: center;">
<a href="https://secure.flickr.com/photos/tim_abell/12293521763/" target="_blank"><img alt="" src="https://farm4.staticflickr.com/3756/12293521763_bfebeeaa41_n.jpg" /></a> </div>
<br />
I looked to gpsbabel, but it apparently can't handle this style of kml file, as differentiated by the coordinates being in the following style of markup:<br />
<br />
<code><gx:Track><br />
<when>2014-01-25T18:00:13.955Z</when><br />
<gx:coord>-1.885348 50.769434</gx:coord><br />
<when>2014-01-25T18:00:14.565Z</when><br />
<gx:coord>-1.885193 50.769328 53.20000076293945</gx:coord><br />
<when>2014-01-25T18:00:58.566Z</when></code>
<br />
<div>
<br />
So I wrote a python script to munge it into gpx shape:</div>
<div>
<br /></div>
<div class="gistLoad" data-id="8791116" id="gist-GistID">
<a href="https://gist.github.com/timabell/8791116" target="_blank">https://gist.github.com/timabell/8791116</a><br />
<br />
This can be run as follows:<br />
<br />
<code>./kmlToGpx.py "25-01 12-48.kml" > "25-01 12-48.kml.gpx"</code><br />
<br />
And worked a treat for me.<br />
<br />
After I'd done this I discovered my pet tool <a href="http://activityworkshop.net/software/gpsprune/index.html">gpsprune</a> can open the new style kml. (I <a href="https://github.com/timabell/gpsprune">forked gpsprune</a> a while ago and added a minor feature) However I'm glad to have a command-line tool as I have hundreds of tracks I want to convert.<br />
<br />
Incidentally the phone can automatically sync the tracks to google drive, which is kinda handy and then you can download them from the site etc.<br />
<div>
<br /></div>
</div>
Tim Abellhttp://www.blogger.com/profile/18329208508756809573noreply@blogger.com3tag:blogger.com,1999:blog-5082828566240519947.post-35445611533346011612014-01-07T13:17:00.002+00:002016-11-17T00:23:37.813+00:00Returning to commercial ASP.NET from Ruby on RailsWhy ASP.NET again after all the noise I made about Ruby on Rails? After a brief stint with commercial Ruby on Rails development I should explain why I've decided my next gig will be an ASP.NET project. In short: currently almost all the Rails work available is in London for digital agencies and start-ups, demanding on-site full time presence, and I burned out doing 3 hours a day commuting in less than half-a-year. This is not a sustainable business plan.<br />
<br />
The emphasis on start-ups and agencies bodes well for the commercial future of Rails as many of these projects will bloom into large systems needing continuing development. But for me the market in the Reading area seems too quiet to make a business success from just Rails. The final straw was being formally offered a rare local permanent Rails job working with all my favourite open source technologies (Rails, Postgres, Linux etc) only to be handed an employment contract with less job security, rights and benefits than a contractor would have. This confirmed my growing understanding of the local market not being suitable.<br />
<br />
So, my updated plan of action is to return to providing programming services to the vibrant .NET market in the local area.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://secure.flickr.com/photos/tim_abell/11677745506/" style="margin-left: 1em; margin-right: 1em;"><img src="https://farm6.staticflickr.com/5548/11677745506_009b52f917_n.jpg" /></a></div>
<br />
This article is for my Linked In audience, if you want to become part of my network or learn more about my professional services send me a message or invite here: <a href="http://www.linkedin.com/in/timabell">http://www.linkedin.com/in/timabell</a><br />
<br />
---<br />
<br />
From a technical perspective my first-hand experience with Ruby on Rails in a mature project has shown me the that the speed boost of Ruby on Rails over ASP.NET is short-lived and once a project becomes larger and more mature the pace of development appears to my eye to be very similar.<br />
<br />
The problems encountered are largely different, but not not biased heavily to one or other stack. For example Rails projects have issues with fragmented and dubiously maintained gems that provide important functionality (not all of them mind; lots are excellent well run projects), whereas Microsoft projects tend to just use whatever Microsoft have supplied warts-and-all; each has pros and cons.<br />
<br />
Having learnt all this first-hand I now believe that my initial concern that Rails would take all of Microsoft's market share in web development due to faster (i.e. cheaper) development is unfounded.<br />
<br />
I also now understand why the Ruby crowd is so much keener on test-driven development than the C# crowd; it's because they lack all the compile-time checks that catch many classes of programming error up front (e.g. changing a method signature and not updating usages).<br />
<br />
The main things I missed when I switched from C# to Ruby were<br />
<ul>
<li>ReSharper:</li>
<ul>
<li>Find usages / definition.</li>
<li>Refactoring.</li>
</ul>
<li>A compiler to catch mistakes sooner.</li>
<li>Being an expert.</li>
</ul>
Tim Abellhttp://www.blogger.com/profile/18329208508756809573noreply@blogger.com0tag:blogger.com,1999:blog-5082828566240519947.post-62479159044892374882013-12-04T23:16:00.003+00:002013-12-05T10:09:30.811+00:00Getting rails 4 up and running with rbenv on Ubuntu 13.10<i>Brain dump warning!</i><br />
<br />
This is a follow up to <a href="http://timwise.blogspot.co.uk/2013/05/installing-ruby-2-rails-4-on-ubuntu.html" style="color: #3465a4;">http://timwise.blogspot.co.uk/2013/05/installing-ruby-2-rails-4-on-ubuntu.html</a> and is just a list of steps needed to get a clean install of Ubuntu up to speed with an existing site.<br />
<ul>
<li dir="ltr">Install rbenv to manage ruby versions</li>
<ul>
<li dir="ltr"><a href="https://github.com/sj26/rbenv-install" style="color: #3465a4;">https://github.com/sj26/rbenv-install</a></li>
<li dir="ltr"><i>git clone https://github.com/sstephenson/rbenv.git ~/.rbenv</i></li>
</ul>
<li>Install ruby-build to manage installation of ruby versions into rbenv</li>
<ul>
<li><a href="https://github.com/sstephenson/ruby-build" style="color: #3465a4;">https://github.com/sstephenson/ruby-build</a></li>
<li><i>git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build</i></li>
</ul>
<li>For convenience install dotmatrix - this will set up the rbenv environment correctly, amongst other things</li>
<ul>
<li>clone <a href="https://github.com/timabell/dotmatrix" style="color: #3465a4;">https://github.com/timabell/dotmatrix</a></li>
<li>run bin/install</li>
<li>restart any running terminal(s) to get rbenv</li>
</ul>
</ul>
<ul>
<li dir="ltr">get a project (includes a .ruby-version file for rbenv, and a Gemfile for bundle)</li>
<ul>
<li dir="ltr"><i>git clone git@github.com:timabell/symbol-library.git</i></li>
</ul>
<li><i>sudo apt-get install libssl-dev libreadline-dev</i></li>
<ul>
<li dir="ltr">readline is needed for rails console, and has to be installed before ruby. If you've already installed ruby then just re-run rbenv install and it will overwrite the existing build with a version with readline support. ref: <a href="http://vvv.tobiassjosten.net/ruby/readline-in-ruby-with-rbenv/" style="color: #3465a4;">http://vvv.tobiassjosten.net/ruby/readline-in-ruby-with-rbenv/</a></li>
</ul>
<li dir="ltr"><i>rbenv install x.x.x-xxxx</i></li>
<ul>
<li dir="ltr">autocompletes, yay!</li>
<li dir="ltr">.. or better still reads from .ruby-version I think so you can just run `rbenv install` if you are in the project folder</li>
</ul>
<li dir="ltr"><i>gem install bundler</i><br /><ul>
<li dir="ltr">from the right directory so done for right ruby version</li>
<li dir="ltr">rbenv rehash</li>
</ul>
</li>
<li dir="ltr"><i>bundle</i><br /><ul>
<li dir="ltr">will install all the gems for the project</li>
</ul>
</li>
<li dir="ltr"><strike>don't sudo apt-get install rbenv ~ </strike>doesn't provide sufficiently up to date ruby</li>
<li dir="ltr"><strike>gem install rails --version 4.0.2 --no-ri --no-rdoc ~ </strike>don't need this when you have a gem file with rails in it, bundle will do it for you</li>
<li dir="ltr"><i>sudo apt-get install nodejs</i><br /><ul>
<li dir="ltr">for javascript runtime (rails server throwing an error without this)</li>
</ul>
</li>
<li dir="ltr"><i>bundle exec rails server</i></li>
<li dir="ltr"><i>bundle exec rails console</i></li>
<ul>
<li dir="ltr">needs readline (see above)</li>
</ul>
</ul>
<div>
Other stuff I like in my install<br />
<ul>
<li dir="ltr">dotmatrix bin/vimbundles<br /><ul>
<li dir="ltr">includes vim-rails and friends</li>
<li dir="ltr">full list <a href="https://github.com/timabell/dotmatrix/blob/master/bin/vimbundles.sh#L45" style="color: #3465a4;">https://github.com/timabell/dotmatrix/blob/master/bin/vimbundles.sh#L45</a></li>
</ul>
</li>
<li dir="ltr">console colours from bin/solarize.sh in dotmatrix/bin</li>
<li dir="ltr">tmux</li>
</ul>
<div>
This is mostly for my own reference but maybe it'll help someone else out.</div>
</div>
Tim Abellhttp://www.blogger.com/profile/18329208508756809573noreply@blogger.com1tag:blogger.com,1999:blog-5082828566240519947.post-45877154406282897132013-05-25T10:03:00.001+00:002014-11-07T15:22:19.522+00:00Unfinished hyperlinks - add a todoJust a quick post;<br />
<br />
<div style="text-align: center;">
<span style="font-family: Courier New, Courier, monospace; font-size: large;">href="#" ==> href="#todo"</span></div>
<br />
I'd like to promote a change to the habit of using '#' as the placeholder for a the url of a new hyperlink when you don't yet know where it'll link to: instead set the href to "#todo". This follows the //todo pattern recognised for unfinished code, and means you can now search your codebase for any links you forgot to finish off.<br />
<br />
<code><a href="#">new link</a><br />
becomes<br />
<a href="<b>#todo</b>">new link</a></code><br />
<div>
eg: <a href="https://www.blogger.com/blogger.g?blogID=5082828566240519947#">new link</a> becomes <a href="https://www.blogger.com/blogger.g?blogID=5082828566240519947#todo">new link</a><br />
<br />
Give all these links an alert with the following (cheers to unknown in the comments)<br />
<br />
<code>$("a[href=#todo]").click(function () { alert('Not implemented yet.') });</code><br />
<br /></div>
It will also give clues to any sharp-eyed testers / users that they should report a bug for you as the url will change to #todo when the unfinished link is clicked. It can often be seen in the status bar too.<br />
This has the handy side-effect of avoiding the annoying jump to the top of the page that is the default behaviour when you click on a # link that's a placeholder.<br />
<hr />
<div>
For bonus points another little trick I like is to add a click handler with an alert to make it really obvious to any early users / testers that this is not done yet, and I've found this saves a lot of questions when you genuinely haven't finished, and also guarantees a quick bug report when you should have (not that I ever forget any of course :-D)
</div>
<br />
<code><a href="#">new link</a><br />
becomes<br />
<a href="<b>#todo</b>" onclick="<b>alert('Not Implemented');</b>">new link</a></code><br />
<div>
eg: <a href="https://www.blogger.com/blogger.g?blogID=5082828566240519947#">new link</a> becomes <a href="https://www.blogger.com/blogger.g?blogID=5082828566240519947#todo" onclick="alert('Not Implemented');">new link</a> <i><= click this to see the alert</i></div>
<br />
Simple and effective.<br />
<br />
If you agree, please help spread the word. Perhaps by retweeting <a href="https://twitter.com/tim_abell/status/338235507203002368">my tweet</a><br />
<br />
<hr />
<br />
P.S. This goes hand in hand with a technique of picking points during development at which there should be no todo's left in your codebase with the exception of those with references to outstanding user story / bug numbers. I suggest before marking a user story as done, and at the end of each sprint as good points to review all todos in your codebase.<br />
<br />
Further reading:<br />
<br />
<ul>
<li><a href="http://wordaligned.org/articles/todo">The case against TODO - wordaligned.org</a></li>
<li><a href="http://blog.jetbrains.com/webide/2012/10/managing-todo/">Using a JetBrains IDE to manage todos</a></li>
</ul>
Tim Abellhttp://www.blogger.com/profile/18329208508756809573noreply@blogger.com2tag:blogger.com,1999:blog-5082828566240519947.post-80355908185013892532013-05-13T10:29:00.000+00:002014-10-16T17:36:56.124+00:00Installing ruby 2 + Rails 4 on Ubuntu 12.04 LTSInstalling <a href="http://www.ruby-lang.org/">Ruby</a> 2 + <a href="http://rubyonrails.org/">Rails</a> 4 on <a href="http://www.ubuntu.com/">Ubuntu</a> 12.04 LTS<br />
<br />
<i>Update Dec 2013: </i>You may also wish to read <a href="http://benkwok.wordpress.com/2013/08/15/install-rails-on-ubuntu-12-04-lts-with-rbenv/">benkwok's blog post on installing ruby and rails</a>. I've also <a href="http://timwise.blogspot.co.uk/2013/12/getting-rails-4-up-and-running-with.html">posted my notes from installing for an existing project</a> which doesn't entirely replace this post but reflects my more recent learnings.<br />
<br />
There's a few of these blog posts around, but here's mine for my own benefit (I'm sure this won't be the last time I do it!).<br />
<br />
If you have a packaged ruby / rails / rvm / rbenv etc installed, get rid of them all, eg:<br />
<br />
<pre><code>$ ruby --version
ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux]
$ sudo apt-get remove ruby</code></pre>
<br />
Don't use <a href="https://rvm.io/">rvm</a>; and make sure it's been literally purged from your system. It's a pain to remove as it gets into all sorts of places and even <i>apt-get purge</i> doesn't undo changes to the profile etc. If you want to know more about the reason for not using it then read the <a href="https://github.com/sstephenson/rbenv/wiki/Why-rbenv%3F">rbenv "why" page</a>, it's persuasive stuff.<br />
<br />
My recommendation from experience so far is to use <a href="http://rbenv.org/">rbenv</a> to install the latest and greatest RoR (Ruby on Rails). Don't bother with the ubuntu packaged version of rbenv (from apt etc) as you'll be off the beaten track and will have to figure out the ruby-build plugin installation yourself. The local user install is painless and works well. The instructions say to make sure rvm is removed first as it's incompatible.<br />
<ul>
<li>Sidenote, <a href="http://rbenv.org/">http://rbenv.org/</a> is just a one-click link to <a href="https://github.com/sstephenson/rbenv">https://github.com/sstephenson/rbenv</a></li>
<li>Direct link to <a href="https://github.com/sstephenson/rbenv#readme">rbenv readme</a> (for your convenience)</li>
</ul>
<div style="text-align: center;">
<a href="https://secure.flickr.com/photos/tim_abell/8734272311"><img src="https://farm8.staticflickr.com/7308/8734272311_0c9c44ca1a_n.jpg" /></a></div>
<div>
<br />
<strong>rbenv installation</strong><br />
<br />
Install rbenv into your home directory:</div>
<pre><code>$ git clone git://github.com/sstephenson/rbenv.git ~/.rbenv</code></pre>
<br />
Set up the environment as per the (ubuntu specific) <a href="https://github.com/sstephenson/rbenv#installation">rbenv installation instructions</a>:<br />
<br />
<pre><code>$ echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.profile
$ echo 'eval "$(rbenv init -)"' >> ~/.profile
</code></pre>
<br />
Unless you've done anything before, there is no ~/.profile file before hand, so the contents will then be:<br />
<br />
<pre><code>$ cat ~/.profile
export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"</code></pre>
<br />
Restart the login shell:<br />
<br />
<pre><code>$ exec $SHELL -l</code></pre>
<br />
Check rbenv is now available:<br />
<br />
<pre><code>$ rbenv
rbenv 0.4.0-45-g060f141
Usage: rbenv <command> [<args>]
...
</code></pre>
<br />
Set up the <a href="https://github.com/sstephenson/ruby-build#readme">ruby-build</a> plugin (as linked in the <a href="https://github.com/sstephenson/rbenv#readme">rbenv readme</a>)<br />
<br />
<pre><code>$ git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build</code></pre>
<br />
Install the necessary ssl library:
<br />
<pre><code>
$ sudo apt-get install libssl-dev</code></pre>
<br />
If you don't install the openssl development libraries you get this:<br />
<br />
<pre><code>BUILD FAILED
...
The Ruby openssl extension was not compiled. Missing the OpenSSL lib?
</code></pre>
<br />
<br />
<div style="text-align: center;">
<a href="https://secure.flickr.com/photos/tim_abell/8734303977"><img src="https://farm8.staticflickr.com/7310/8734303977_0f753f999a_n.jpg" /></a></div>
<br />
<br />
<strong>Ruby installation</strong><br />
<br />
Install the latest ruby (version name obtained from <a href="http://www.ruby-lang.org/en/news/2013/02/24/ruby-2-0-0-p0-is-released/">release info on ruby blog</a>), takes 5-10 mins<br />
<pre><code>
</code></pre>
<pre><code>$ rbenv install 2.0.0-p0</code></pre>
<br />
Now select the installed ruby as the default for your user (ref: <a href="https://github.com/sstephenson/rbenv#choosing-the-ruby-version">https://github.com/sstephenson/rbenv#choosing-the-ruby-version</a>)<br />
<br />
<pre><code>$ rbenv global 2.0.0-p0
tim@atom:~$ ruby --version
ruby 2.0.0p0 (2013-02-24 revision 39474) [x86_64-linux]</code></pre>
<br />
<br />
<strong>Rails installation</strong><br />
<br />
Now as per the <a href="http://weblog.rubyonrails.org/2013/5/1/Rails-4-0-release-candidate-1/">Rails 4 RC1 announcement</a> install the release candidate of Rails 4 (this was the latest at time of writing). Takes 5-10 mins.<br />
<pre><code>$ gem install rails --version 4.0.0.rc1 --no-ri --no-rdoc</code></pre>
<br />
Tell rbenv to create the new shims and see the installed rails:
<br />
<pre><code>$ rbenv rehash
$ rails --version
Rails 4.0.0.rc1</code></pre>
<br />
<hr />
<br />
All done! That wasn't so hard, it was all the blind alleys that took the time.
<br />
<br />
Now use <a href="http://gembundler.com/">bundler</a> as recommended in the rbenv readme to set up an app etc.<br />
<br />
Thanks for listening :-)
<br />
<br />
<i>Footnote:</i> It pains me somewhat to have to use installations outside of the Ubuntu package manager, however it seems there are some grumblings about the packaged versions of the above software. Add into this that I wish to use the latest RoR on an LTS release of Ubuntu which seeing as the Rails community don't seem to provide debs / repos etc leaves a packaged version out of the question for now. I've learned previously the hard way the destructive effect of randomly installing everything you find outside the package management system of a distro so have tread carefully when creating the above information.<br />
<br />
Further reading <a href="http://benkwok.wordpress.com/2013/08/15/install-rails-on-ubuntu-12-04-lts-with-rbenv/">http://benkwok.wordpress.com/2013/08/15/install-rails-on-ubuntu-12-04-lts-with-rbenv/</a>Tim Abellhttp://www.blogger.com/profile/18329208508756809573noreply@blogger.com3tag:blogger.com,1999:blog-5082828566240519947.post-26010047547568242372013-04-02T21:25:00.000+00:002013-04-02T21:37:03.810+00:00Java checked and runtime exceptions and how to transition<p>As primarily a C# programmer I've never been sold on checked exceptions, mostly seeing them as an unnecessary nuisance forcing programmers to introduce reams of boilerplate <code>throws</code> / <code>try-catch</code> blocks into their consuming code to propagate these exceptions up the stack.</p>
<p>Whilst coding on <a href="https://github.com/timabell/FreeTTS">https://github.com/timabell/FreeTTS</a> I was forced to deal with this personal demon.</p>
<p>I've read that checked exceptions are a way of making exceptions be part of the declared API for some class or library, and that it forces client programmers to handle error conditions that the API programmer knows are likely to occur (e.g. the library relies on the filesystem internally so declares it throws a <code>IOException</code> when calling a relevant method.</p>
<p>I have some sympathy with this idea and can see how it can allow for more robust code when done well. My experience has generally been that it is not handled well and the reaction is to add a lot of meaningless code or to throw away the exception and hide the problem, causing difficulties troubleshooting later.</p>
<p><a href="http://www.flickr.com/photos/tim_abell/8278346178" style="float: left; margin: 0 1em 0 0;"><img src="http://farm9.staticflickr.com/8337/8278346178_3bcf551666_q.jpg" /></a> When I've been in control of the API I've been tempted to always through runtime exceptions and avoid the problem entirely, however this time whilst working on someone else's class I came across a call to an external library that threw an <code>IOException</code> which I couldn't change. This made me think a bit harder about the problem. I initially thought my options were to immediately catch and rethrow as a runtime exception or to add <code>throws IOException</code> / <code>throws Exception</code> to every piece of the call chain.</p>
<p>I tried the latter approach of propagating the <code>throws</code> up through many layers, which although messy did work; right up until I hit a call within a <code>toString()</code> method, which is defined by <code>Object</code> and doesn't allow you to change the API of the method (by adding a checked exception). Incidentally I think that having toString() rely on code that could throw a file system exception like this did is a dodgy design, but that wasn't my code and would have been a large rewrite.</p>
<p>So after a bit of grumbling to myself I looked more closely at the fault line between the checked exception being thrown and the rest of the codebase. The existing code was just ignore the error with <code>catch {}</code> (shudder) and returning null, making it hard to troubleshoot a failing JUnit test.</p>
<p>I think the answer to the conundrum is that for each method in the chain you have to decide if callers of the method could usefully handle the error condition, or whether they could add any useful information to the stack trace to assist troubleshooting. Here's roughly the approach I've taken which I think should be illustrative:</p>
<p>Method that throws</p>
<pre><code>String getSomething(string filename) throws IOException {
// do some file IO
return someData;
}
</code></pre>
<p>Next method up. Doesn't compile as checked exception not handled, what to do?</p>
<pre><code>String loadFoo() {
String foo = getSomething("this.txt");
return foo;
}
</code></pre>
<p>In this case I don't think <code>getSomething</code> should be the last point in the chain as it doesn't know <em>why</em> it was performing the operation it was. <code>loadFoo</code> however knows both the resource being accessed and what the intent was, so can report an exception message that should point someone troubleshooting immediately to the source of the problem and inform them what the program was trying to achieve. Having <code>loadFoo()</code> declare that it <code>throws IOException</code> doesn't make sense as the caller shouldn't need to know how <code>loadFoo</code> gets its data, it's just the kind of noise that programmers dislike Java for. So the answer in my opinion is because <code>loadFoo()</code> is best placed to give all the useful information needed to fix the problem, it should catch the checked exception, wrap it in a runtime exception, add a useful message and rethrow it. This saves callers from needing to handle exceptions that they can't usefully deal with, whilst still providing good troubleshooting information. And yet there's still a use for the checked exceptions as <code>getSomething()</code> was able to declare that it new an <code>IOException</code> was possible but that it wasn't in a position to give enough useful information.</p>
<p>So the final code I ended up with looked something like this:</p>
<pre><code>String getSomething(string filename) throws IOException {
// do some file IO
return someData;
}
String loadFoo() {
String filename = "this.txt";
try {
String foo = getSomething(filename);
return foo;
} catch (IOException ex) {
throw new RuntimeException("Failed to read foo from '" + fileName + "'", ex);
}
}
</code></pre>
<h2>Inversion of control (IoC)</h2>
<p>A colleague of mine mentioned IoC as a problem for checked exceptions. This is an interesting point and does complicate things.</p>
<h2>References</h2>
<ul>
<li><a href="http://stackoverflow.com/questions/613954/the-case-against-checked-exceptions">http://stackoverflow.com/questions/613954/the-case-against-checked-exceptions</a></li>
<li><a href="http://stackoverflow.com/questions/27578/when-to-choose-checked-and-unchecked-exceptions">http://stackoverflow.com/questions/27578/when-to-choose-checked-and-unchecked-exceptions</a></li>
<li><a href="http://stackoverflow.com/questions/1656376/why-are-runtime-exceptions-unchecked-in-java">http://stackoverflow.com/questions/1656376/why-are-runtime-exceptions-unchecked-in-java</a></li>
<li><a href="http://stackoverflow.com/questions/4639432/checked-vs-unchecked-exception?rq=1">http://stackoverflow.com/questions/4639432/checked-vs-unchecked-exception?rq=1</a></li>
<li><a href="http://stackoverflow.com/questions/3613422/exception-handling-in-java?rq=1">http://stackoverflow.com/questions/3613422/exception-handling-in-java?rq=1</a></li>
<li><a href="http://docs.oracle.com/javase/tutorial/essential/exceptions/runtime.html">http://docs.oracle.com/javase/tutorial/essential/exceptions/runtime.html</a></li>
</ul>
Tim Abellhttp://www.blogger.com/profile/18329208508756809573noreply@blogger.com0tag:blogger.com,1999:blog-5082828566240519947.post-83816282685597191032012-12-05T00:33:00.000+00:002012-12-05T00:33:51.154+00:00Subversion to git - the pain retoldI've spent a week reminding myself why svn sucks.<br />
<br />
I've been using the <a href="http://freetts.sourceforge.net/">freetts</a> library for speech synth in the <a href="http://communication-book.wikispaces.com/">communication book</a> program I've been working on, and have tripped over a bug in freetts running under openJdk. The freetts source code lives in a svn repository on sourceforge. The first step in troubleshooting is to build the library from source. In order to track any local experimentation / fixes I need to have some kind of local source control, and svn sucks too much to provide this. The obvious next step is to pull the sources down with git-svn (or svn2git as github recommends).<br />
<br />
After a couple of aborted attempts I was reminded how the loosely defined structure of a svn repository and the over-generalization of tags & branches allows for a complete mess, which then is a pain to import cleanly.<br />
<br />
<blockquote class="tr_bq">
"And they want to make snapshots of smaller subdirectories of the filesystem. After all, it's not so easy to remember that release 1.0 of a piece of software is a particular subdirectory of revision 4822." -- <b>Argh!</b> Terrible "feature", if you're using this feature then <i>you're doing source control wrong</i>! (Quote taken from <a href="http://svnbook.red-bean.com/en/1.7/svn.branchmerge.tags.html" style="color: #3465a4;">http://svnbook.red-bean.com/en/1.7/svn.branchmerge.tags.html</a> )</blockquote>
<br />
<div>
I could just grab a tarball and start from there, however there is new code upstream since their last release (v1.2.2), and that means testing two branches, and possibly investigating diffs. In addition if I'm going to make the effort to import the history, I ought to do it well enough first time that others can build on it. It's much harder to correct a bad scm import once work is continued, especially in the distributed world of open source.<br />
<br />
And so, for my sins, I set about importing the history, and hacking away at it with the excellent tools git provides to turn it into something that actually linked together correctly and didn't make me feel ill by including CVSROOT all over the place (yes, it's not the first migration this project's been through).<br />
<br />
On the plus side, it is fantastic that the open source license gives a user of a library such as myself the right to go ahead and do something like this and to share the improvement with the world, regardless of whether it's something the original creators / maintainers would have done.<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://www.flickr.com/photos/tim_abell/8160450028/"><img border="0" src="https://farm8.staticflickr.com/7271/8160450028_af1097a2f7_n.jpg" /></a></div>
<div style="text-align: center;">
<br /></div>
<br />
The layout of the FreeTTS svn repo is not consistent in directory structure, which means the svn import tools don't behave quite as one might expect. This is the inevitable downside to subversions poor choice of architecture around "everything's just a directory structure". (Bitter? Me? Never!)</div>
<div>
<br />
Here's a taster of how inconsistent the layout is and what a challenge is ahead tidying it up:<br />
<br />
<a href="http://www.blogger.com/tim@atom:~/repo/freetts.svn$" style="color: #3465a4;">tim@atom:~/repo/freetts.svn$</a> ls */*<br />
<span style="font-family: Courier New, Courier, monospace;">branches/release:<br />FreeTTS<br /><br />tags/freetts:<br />FreeTTS<br /><br />tags/pre-rel1-1:<br />FreeTTS<br /><br />tags/rel_1_0_5:<br />CVSROOT FreeTTS<br /><br />tags/rel1_1_0:<br />FreeTTS<br /><br />tags/rel1_1_2:<br />FreeTTS<br /><br />tags/rel1_2_0:<br />CVSROOT FreeTTS<br /><br />tags/rel1_2_1:<br />FreeTTS<br /><br />tags/rel1_2_2:<br />acknowledgments.txt build.xml demo.xml index.html license.terms overview.html RELEASE_NOTES speech.properties tests<br />ANNOUNCE.txt demo docs lib mbrola README.txt rtp src tools<br /><br />tags/rel_1_2_beta:<br />FreeTTS<br /><br />tags/rel1_2beta2:<br />CVSROOT FreeTTS<br /><br />tags/start:<br />FreeTTS<br /><br />tags/sun:<br />FreeTTS<br /><br />trunk/CVSROOT:<br />checkoutlist commitinfo config cvsignore cvswrappers editinfo loginfo modules notify rcsinfo syncmail taginfo verifymsg<br /><br />trunk/FreeTTS:<br />acknowledgments.txt build.xml demo.xml index.html license.terms overview.html RELEASE_NOTES speech.properties tools<br />ANNOUNCE.txt demo docs lib mbrola README.txt rtp src unittests</span><br />
<br />
It took all my git-fu powers to sort out this mess. Below is a time shortened sequence of how it was done, just in case I have the misfortune to need to do it again. I ended up abandoning all the ancient tags as they were going to be more effort than I liked to fix, and they could be added retrospectively if anyone really cared. It took me many attempts to get to the below, and this is what I've reconstructed from my fragmented history, hopefully it will provide enough clues should you wish to do similar.<br />
<br />
<br />
FreeTTS project urls: Project front page <a href="http://freetts.sourceforge.net/" style="color: #3465a4;">http://freetts.sourceforge.net/</a> , project site <a href="http://sourceforge.net/projects/freetts/" style="color: #3465a4;">http://sourceforge.net/projects/freetts/</a> , repo browser <a href="http://freetts.svn.sourceforge.net/viewvc/freetts/" style="color: #3465a4;">http://freetts.svn.sourceforge.net/viewvc/freetts/</a> , svn http access <a href="https://freetts.svn.sourceforge.net/svnroot/freetts/" style="color: #3465a4;">https://freetts.svn.sourceforge.net/svnroot/freetts/</a><br />
At time of writing the current svn revision is 582.</div>
<div>
<br /></div>
<div>
The latest packaged version for ubuntu:<br />
<blockquote class="tr_bq">
<b>apt-cache show freetts</b>Package: freetts<br />
Priority: optional<br />
Section: universe/java<br />
Installed-Size: 13532<br />
Maintainer: Ubuntu Developers <<a href="http://www.blogger.com/ubuntu-devel-discuss@lists.ubuntu.com%3E" style="color: #3465a4;">ubuntu-devel-discuss@lists.ubuntu.com></a>Original-Maintainer: Bdale Garbee <<a href="http://www.blogger.com/bdale@gag.com%3E" style="color: #3465a4;">bdale@gag.com></a>Architecture: all<br />
<b>Version: 1.2.2-3</b>Depends: default-jre | java2-runtime<br />
Filename: pool/universe/f/freetts/freetts_1.2.2-3_all.deb<br />
Size: 9456904<br />
MD5sum: 183bed09b1b8e2d8642f46b7538273f4<br />
SHA1: 8df47df82124704b890f446a1bc958d33fd273d3<br />
SHA256: 8920440eaa58c087cb268e8e2a64d44ac873fb44d49b34f180f587f9c69421a7<br />
Description-en: speech synthesis system<br />
FreeTTS is a speech synthesis system written entirely in the Java(TM)<br />
programming language. It is based upon Flite, a small run-time speech<br />
synthesis engine developed at Carnegie Mellon University. Flite in turn<br />
is derived from the Festival Speech Synthesis System from the University<br />
of Edinburgh and the FestVox project from Carnegie Mellon University.<br />
Homepage: <a href="http://freetts.sourceforge.net/" style="color: #3465a4;">http://freetts.sourceforge.net</a>Description-md5: a346fe6dcc2c0164ec6b7c3891945e56<br />
Bugs: <a href="https://bugs.launchpad.net/ubuntu/+filebug" style="color: #3465a4;">https://bugs.launchpad.net/ubuntu/+filebug</a>Origin: Ubuntu</blockquote>
<br />
<br />
So here's the import more or less as it happened:<br />
<br />
mkdir freetts.svn.git; cd freetts.svn.git<br />
svn2git --verbose <a href="https://freetts.svn.sourceforge.net/svnroot/freetts/" style="color: #3465a4;">https://freetts.svn.sourceforge.net/svnroot/freetts/</a><br />
git gc<br />
<br />
cat .git/config <br />
<blockquote class="tr_bq">
[core]<br />
repositoryformatversion = 0<br />
filemode = true<br />
bare = false<br />
logallrefupdates = true<br />
[svn-remote "svn"]<br />
noMetadata = 1<br />
url = <a href="https://freetts.svn.sourceforge.net/svnroot/freetts" style="color: #3465a4;">https://freetts.svn.sourceforge.net/svnroot/freetts</a> fetch = trunk:refs/remotes/svn/trunk<br />
branches = branches/*:refs/remotes/svn/*<br />
tags = tags/*:refs/remotes/svn/tags/*<br />
[branch "release"]<br />
remote = .<br />
merge = refs/remotes/svn/release</blockquote>
<br />
<br />
# get a copy without the svn references (which stop us seeing whether the rewritten history is free of old cruft)</div>
<div>
cd ..<br />
git clone freetts.svn.git/ freetts.git<br />
cd freetts.git/<br />
gitk --all &<br />
<b># The following is done while keeping an eye on and refreshing (ctrl+f5) gitk to see the effects:</b><br />
# Filter out the cvs rubbish so that git can match up commits that do have it with commits that don't<br />
git filter-branch --tree-filter 'rm -rf CVSROOT' --prune-empty -- --all<br />
# Remove the unnecessary top level folder (which inconsistently existed)<br />
git filter-branch --prune-empty --subdirectory-filter FreeTTS/ -- --all<br />
# Remove the backup refs filter-branch creates<br />
rm -rf .git/refs/original/<br />
<br />
# delete all the crappy svn "tags", just tag the latest<br />
git tag -d `git tag`<br />
<blockquote class="tr_bq">
Deleted tag 'freetts' (was 8d953b7)<br />
Deleted tag 'pre-rel1-1' (was d1c597f)<br />
Deleted tag 'rel1_1_0' (was 625abdd)<br />
Deleted tag 'rel1_1_2' (was b51fb71)<br />
Deleted tag 'rel1_2_0' (was 7a4fc18)<br />
Deleted tag 'rel1_2_1' (was a126a4a)<br />
Deleted tag 'rel1_2_2' (was b3a0dcf)<br />
Deleted tag 'rel1_2_2@557' (was bf94dbe)<br />
Deleted tag 'rel1_2beta2' (was c0d90e9)<br />
Deleted tag 'rel_1_0_5' (was e95aff8)<br />
Deleted tag 'rel_1_2_beta' (was 1723b2d)<br />
Deleted tag 'start' (was c020efe)<br />
Deleted tag 'sun' (was cfadbc8)</blockquote>
<br />
# correct commit found manually:<br />
git tag v1.2.2 ae49425<br />
<br />
and finally, push to github<br />
<br />
git remote add origin .... (my repo details)<br />
git push --mirror<br />
<br />
You can find my repo at <a href="https://github.com/timabell/FreeTTS">https://github.com/timabell/FreeTTS</a><br />
and the intermediate copy here: <a href="https://github.com/timabell/FreeTTS-svn-mirror">https://github.com/timabell/FreeTTS-svn-mirror</a><br />
<br />
<div style="text-align: center;">
<i>All done</i></div>
<div style="text-align: center;">
<i><br /></i></div>
<div style="text-align: center;">
<i>^_^</i></div>
<div>
<br /></div>
<div>
<br /></div>
<br />
Here's the reason I didn't bother with tags in the end: I couldn't rewrite the tags as they had no author:<br />
<br />
git filter-branch --tree-filter 'rm -rf CVSROOT' --prune-empty --tag-name-filter cat -- --tags<br />
Cannot create a new backup. <br />
A previous backup already exists in refs/original/<br />
Force overwriting the backup with -f<br />
<a href="http://www.blogger.com/tim@atom:~/repo/freetts.git$" style="color: #3465a4;">tim@atom:~/repo/freetts.git$</a> rm -rf .git/refs/original/ <br />
<a href="http://www.blogger.com/tim@atom:~/repo/freetts.git$" style="color: #3465a4;">tim@atom:~/repo/freetts.git$</a> git filter-branch --tree-filter 'rm -rf CVSROOT' --prune-empty --tag-name-filter cat -- --tags<br />
Rewrite 8611e271692fc33e6160a2a217b9b3060dfbcd1d (1044/1044)<br />
Ref 'refs/tags/freetts' was rewritten<br />
WARNING: Ref 'refs/tags/pre-rel1-1' is unchanged<br />
WARNING: Ref 'refs/tags/rel1_1_0' is unchanged<br />
Ref 'refs/tags/rel1_1_2' was rewritten<br />
Ref 'refs/tags/rel1_2_0' was rewritten<br />
Ref 'refs/tags/rel1_2_1' was rewritten<br />
Ref 'refs/tags/rel1_2_2' was rewritten<br />
Ref 'refs/tags/rel1_2_2@557' was rewritten<br />
Ref 'refs/tags/rel1_2beta2' was rewritten<br />
Ref 'refs/tags/rel_1_0_5' was rewritten<br />
Ref 'refs/tags/rel_1_2_beta' was rewritten<br />
Ref 'refs/tags/start' was rewritten<br />
Ref 'refs/tags/sun' was rewritten<br />
freetts -> freetts (b3a4bbf8768ade6275c91ce0e76d933e30b3ddbf -> 48e84e3560e765db3b33479e2e9a76fe2ccf3550)<br />
<b>error: char79: malformed tagger field<br />fatal: invalid tag signature file<br />Could not create new tag object for freetts</b><br />
<b><br /></b>
<b><br /></b>
git show rel_1_2_beta | head<br />
tag rel_1_2_beta<br />
<b>Tagger: (no author) <(no author)@4963320b-1a4a-0410-81c8-f0a525965860></b>Date: Mon Dec 22 14:46:05 2003 +0000<br />
<br />
This commit was manufactured by cvs2svn to create tag '\''rel_1_2_beta'\''.<br />
<br />
commit 57ed00e981585aad590c9521d7c3a0bccf6284fa<br />
Author: (no author) <(no author)@4963320b-1a4a-0410-81c8-f0a525965860><br />
Date: Mon Dec 22 14:46:05 2003 +0000</div>
<div>
<br /></div>
<div>
------</div>
<div>
<br /></div>
<div>
My advice if you are importing svn for a commercial project: Don't! Just export, and import into your new source control tool. Leave the svn repo read only for a while just in case you need that history, and after a year of never looking back, archive it off.</div>
Tim Abellhttp://www.blogger.com/profile/18329208508756809573noreply@blogger.com0tag:blogger.com,1999:blog-5082828566240519947.post-65618842911653714072012-07-10T19:13:00.000+00:002012-07-21T18:01:03.574+00:00AA Gold member benefits, the real cost<span style="background-color: white;"><b>Breakdown cover maths</b></span><br />
<br />
So, I'm getting rather fed up with the AA taking the michael every year with their renewals. Yes, I gather the RAC are just as bad but I think they need to realise their customers aren't stupid, know exactly what they are playing at, and can do the maths.<br />
<br />
I want to highlight what I think is a particularly dirty trick, making something look like a free perk when it's anything but.<br />
<br />
<b>So here's some numbers:</b><br />
<br />
This is for a single car policy covering Roadside, Home Start and Relay starting July 2012 paying annually for a year up front. (The monthly option is 10% more expensive, go figure). Numbers rounded to pounds.<br />
<br />
<br />
<ul>
<li><span style="background-color: white;">Renewal through the post: </span><b style="background-color: white;">£135</b></li>
<li><span style="background-color: white;">Matching </span><a href="http://www.rac.co.uk/uk-breakdown/" style="background-color: white;">RAC cover</a><span style="background-color: white;"> (checked online & by phone): </span><b style="background-color: white;">£101</b></li>
<li><a href="http://www.theaa.com/breakdown-cover/uk-breakdown/view-options.do?optMshp=vcon300" style="background-color: white;">AA online price</a><span style="background-color: white;"> for new customers: </span><b style="background-color: white;">£92</b><span style="background-color: white;"> - </span><span style="background-color: white;">(so much for 6 years loyalty, a </span><b style="background-color: white;"><span style="color: red;">£43</span></b><span style="background-color: white;"> kick in the teeth)</span></li>
<li><span style="background-color: white;">AA phone price: </span><b style="background-color: white;">£116</b></li>
<li><span style="background-color: white;">AA phone price <i>without gold membership "benefits"</i>: </span><b style="background-color: white;">£89</b></li>
</ul>
<br />
<b><br /></b><br />
That means, the AA are pricing their gold benefits at <b><span style="color: red;">£27</span></b> even though they look like they are free on the renewal letter! Some cheek.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzjUaYLSGm07mzqD7ICidyVK_IXsw_PBAKnywNNER6l_zp-OY4HjYxmvXqiRv7NWbBYXcDC-ynzki_RGQ6uRXxxkRoM2rhJvluYm_UYNERg-myKdH3uASoRHcUVG6qFs-Br1kzSe_YnL6I/s1600/20120710_001.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="207" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzjUaYLSGm07mzqD7ICidyVK_IXsw_PBAKnywNNER6l_zp-OY4HjYxmvXqiRv7NWbBYXcDC-ynzki_RGQ6uRXxxkRoM2rhJvluYm_UYNERg-myKdH3uASoRHcUVG6qFs-Br1kzSe_YnL6I/s400/20120710_001.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
I queried the details of this so called benefit and established the following:</div>
<div class="separator" style="clear: both; text-align: left;">
</div>
<ul>
<li><i>"Accident Management"</i> - means being towed by the AA after an accident (something you may be covered for under your car insurance policy)</li>
<li><i>European Breakdown Cover</i> - only useful if you are going abroad (obviously), did you really want to be paying for it?</li>
<li><i>"Family Associates Cover for under 17s"</i> - something about teenagers, I don't have any so not very useful to me</li>
<li><i>Key Insurance</i> - this could be valuable, but £27/year sounds like very expensive insurance to me even though they are expensive items to replace.</li>
<li><i>Legal Advice</i> - <b>Included as standard!</b> So not a gold benefit at all. Weasels.</li>
<li><i>Technical Advice</i> - <b>Included as standard!</b> See above. Still weasels.</li>
</ul>
<div>
<br /></div>
<div>
So it turns out that the supposed discount of <b>£44.90</b> on the posted renewal was actually a <b><span style="color: red;">£46</span></b> insult to my intelligence.</div>
<br />
<br />
I'm no money saving expert, but that's outrageous.Tim Abellhttp://www.blogger.com/profile/18329208508756809573noreply@blogger.com7tag:blogger.com,1999:blog-5082828566240519947.post-65464567804545695392012-07-10T14:43:00.001+00:002012-07-10T14:43:30.568+00:00Configuration confusion in visual studioHere's a gotcha that got me.<br />
<br />
It is not immediately obvious, but visual studio stores in it's sln file a set of project configuration selections for every combination of solution configuration and solution platform.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgTHqfHRLwc7HUKtkKzDOG0yQv8PSctvvKu-lCqqLo-pMdvvDiZv3KZgrr20O8dQxbrYRDj7VvxpSucojRndBQ49oqdaquD8u2sLAvm-dPa2oUqoXqlYZbrSqPx2I2FMyBnbNYEOLjr85jJ/s1600/visual-studio-platform-selection.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="201" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgTHqfHRLwc7HUKtkKzDOG0yQv8PSctvvKu-lCqqLo-pMdvvDiZv3KZgrr20O8dQxbrYRDj7VvxpSucojRndBQ49oqdaquD8u2sLAvm-dPa2oUqoXqlYZbrSqPx2I2FMyBnbNYEOLjr85jJ/s320/visual-studio-platform-selection.PNG" width="320" /></a></div>
<br />
The gotcha is that by default Visual Studio (all versions 2008-2012 as far as I know) only show one half of that combination in the standard toolbar, so you can get in a situation where one of your developers is building something completely different to everyone else as somehow the platform has silently been changed.<br />
<br />
I recommend you add Platform to your toolbar so that you can <i>always</i> see what you are about to build.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgASmngF4Bu16cWAWm940FCQGrQZWkWLwFK5GVEt-VDiKkTLxcdj0mz-hgRiunlUHE7ySA_F9rFqZREPHJODesTNtsLjABgs6mlYTD157T-px8c_xqcgUpaNnbLynvBMt5RIbWkpO5LPEmy/s1600/visual-studio-platform-toolbar.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgASmngF4Bu16cWAWm940FCQGrQZWkWLwFK5GVEt-VDiKkTLxcdj0mz-hgRiunlUHE7ySA_F9rFqZREPHJODesTNtsLjABgs6mlYTD157T-px8c_xqcgUpaNnbLynvBMt5RIbWkpO5LPEmy/s320/visual-studio-platform-toolbar.PNG" width="311" /></a></div>
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiNaUPoAVfBkXcQZVgAleUB_CQO9swKJUtxR1YE97Y8OwtsFYhWksc7vu4fgpmhF0LB9X2xYYVfbThpK8zxIMekr9Ws4jR1yGn-JOnJ_IuwwiEVFwSmOzdnrUuz3-cHbRhTKSaKxd-SKRsn/s1600/visual-studio-platform-command.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="202" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiNaUPoAVfBkXcQZVgAleUB_CQO9swKJUtxR1YE97Y8OwtsFYhWksc7vu4fgpmhF0LB9X2xYYVfbThpK8zxIMekr9Ws4jR1yGn-JOnJ_IuwwiEVFwSmOzdnrUuz3-cHbRhTKSaKxd-SKRsn/s320/visual-studio-platform-command.PNG" width="320" /></a></div>
<br />
And if possible, remove any unused platform configurations from your solution entirely.Tim Abellhttp://www.blogger.com/profile/18329208508756809573noreply@blogger.com0tag:blogger.com,1999:blog-5082828566240519947.post-73563685767521624352012-06-14T15:10:00.000+00:002012-06-14T15:12:25.991+00:00automatic mysql backupsOn a debian server with mediawiki installed and running with a local mysql.<br />
<br />
<code>root@myserver:~# apt-get install automysqlbackup<br />
<br />
root@myserver:~# crontab -e<br />
<br />
# m h dom mon dow command<br />
5 4 * * * automysqlbackup<br />
<br />
<br />
root@myserver:~# automysqlbackup<br />
root@myserver:~# cd /var/lib/automysqlbackup/<br />
root@myserver:/var/lib/automysqlbackup# find .<br />
.<br />
./weekly<br />
./weekly/wikidb<br />
./weekly/information_schema<br />
./daily<br />
./daily/wikidb<br />
./daily/wikidb/wikidb_2012-06-14_16h03m.Thursday.sql.gz<br />
./daily/information_schema<br />
./daily/information_schema/information_schema_2012-06-14_16h03m.Thursday.sql.gz<br />
./monthly</code><br />
<br />
Result! No longer need to write a custom cron script each time.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://www.flickr.com/photos/tim_abell/7255107648/"><img border="0" src="http://farm8.staticflickr.com/7226/7255107648_929530d9e0_n.jpg" /></a></div>
<br />
Project homepage: <a href="http://sourceforge.net/projects/automysqlbackup/">http://sourceforge.net/projects/automysqlbackup/</a><br />
<br />Tim Abellhttp://www.blogger.com/profile/18329208508756809573noreply@blogger.com0tag:blogger.com,1999:blog-5082828566240519947.post-9099069018586512462012-06-11T18:17:00.001+00:002012-06-11T18:17:38.462+00:00Connecting to smb shares on a domain in gnomeThe domain name has to be UPPERCASE otherwise authentication fails.<br />
<br />
Majorly confusing.<br />
<br />
Time lost: 3 hours.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHNFo4_XcddvkdBaNKxXy1Q1SuH5fqiCrYZnKc4oypdJd7IXZ_YwzvDF4GwBH0nrgQESNiKqSgmkOSJpftM_cqMj23qZ2MDPDznZ7gpeFf2AMzA-mCTky3g56DP872p1i8LDzKYLcSzshe/s1600/smb-domain.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHNFo4_XcddvkdBaNKxXy1Q1SuH5fqiCrYZnKc4oypdJd7IXZ_YwzvDF4GwBH0nrgQESNiKqSgmkOSJpftM_cqMj23qZ2MDPDznZ7gpeFf2AMzA-mCTky3g56DP872p1i8LDzKYLcSzshe/s320/smb-domain.png" width="299" /></a></div>
<br />
<br />
SighTim Abellhttp://www.blogger.com/profile/18329208508756809573noreply@blogger.com1tag:blogger.com,1999:blog-5082828566240519947.post-26567261047831116772012-05-22T16:58:00.000+00:002014-10-16T17:40:31.093+00:00Debugging stored procedures in VS2010 / SQL Express<br />
<div>
Debugging stored procs in a <i>local</i> SQL Express install with Visual Studio 2010.</div>
<div>
<br /></div>
<div>
Enable TCP/IP - see <a href="http://timwise.blogspot.co.uk/2012/05/enabling-tcpip-in-sql-express-2008-r2.html">http://timwise.blogspot.co.uk/2012/05/enabling-tcpip-in-sql-express-2008-r2.html</a></div>
<div>
<br /></div>
<div>
In Visual Studio, Server Explorer, Connect to your server as localhost instead of .\SQLEXPRESS so that you connect through TCP/IP and not shared memory (which doesn't allow debugging for some reason)</div>
<div>
<br /></div>
<div>
Find the project in your solution which actually executes the stored procedure, right-click > properties > debug > "Enable SQL Server debugging"</div>
<div>
<br /></div>
<div>
Run your project</div>
<div>
<br /></div>
<div>
You may need to hit "stop" and re-attached (debug > attach to process) explicitly selecting "T-SQL code" in the "attach to" box (and optionally managed as well). It *should* automatically select T-SQL but it seems to be hit and miss.</div>
<div>
<br /></div>
<div>
Set a breakpoint in your stored procedure:</div>
<div>
<ul>
<li>Server explorer, </li>
<li>the connection you added,</li>
<li>stored procs,</li>
<li>right-click the proc name > open</li>
<li>set a break point in the text of the stored proc</li>
<ul>
<li>if it is not a solid red dot then something went wrong</li>
</ul>
</ul>
<div>
Run the part of your program / website that will cause the proc to be called.</div>
</div>
<div>
<br /></div>
<div>
If the breakpoint isn't hit check the type's in the attach to process list include T-SQL (doesn't seem to always work).</div>
<div>
<br /></div>
<div>
I only got the damn thing to work once. If it doesn't work you get no reason at all which is just crap. The main problem I have is that the attach just quietly drops T-SQL even if you explicitly request it. Shoddy coding from Microsoft in my opinion.<br />
<br />
The next best thing is to right-click the stored proc, click "step into" and input the values manually. (Which also requires a tcp/ip connection to the local sql express and is fussy).</div>
<div>
<br />
Another message encountered a couple of days later without changing anything at all when attaching to the already running web dev process: "<a href="http://msdn.microsoft.com/en-us/library/ms241735(v=vs.100).aspx"><span id="goog_211408035"></span>User Could Not Execute Stored Procedure sp_enable_sql_debug<span id="goog_211408036"></span></a>"<br />
<br /></div>
<div>
refs:<br />
<br />
<ul>
<li><a href="http://stackoverflow.com/questions/4737175/the-breakpoint-will-not-currently-be-hit-error-when-trying-to-debug-a-tsql">http://stackoverflow.com/questions/4737175/the-breakpoint-will-not-currently-be-hit-error-when-trying-to-debug-a-tsql</a></li>
<li><a href="http://social.msdn.microsoft.com/forums/en-US/vstsdb/thread/f5247d99-06f0-4ae3-9371-04c70f750647/">http://social.msdn.microsoft.com/forums/en-US/vstsdb/thread/f5247d99-06f0-4ae3-9371-04c70f750647/</a>
</li>
<li><a href="http://support.microsoft.com/kb/316549/en-us">http://support.microsoft.com/kb/316549/en-us</a> (from comment below)</li>
</ul>
</div>
<div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinAk-CoWDbKse4_H9pKPIkMgLHS4rWxMjxihqIsIeplZiEKSYmKrZh0nLWFTQ7OL3kLF26M6p6RveqwVRrLMAOzqC_jnZJGLtC6QkE36AMl_twCsTfzVzI8wC3iOWjiFQqhzSQ6R1UK8f_/s1600/debug-t-sql-attach.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinAk-CoWDbKse4_H9pKPIkMgLHS4rWxMjxihqIsIeplZiEKSYmKrZh0nLWFTQ7OL3kLF26M6p6RveqwVRrLMAOzqC_jnZJGLtC6QkE36AMl_twCsTfzVzI8wC3iOWjiFQqhzSQ6R1UK8f_/s320/debug-t-sql-attach.png" height="216" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjinoCqWmbn6dM1BAdi9EuRivbWft7tMvAHGrGRdZJaFconJy0L-fDjM6hEOA5awL7UNnAcVO5GHKOZOxb6tx10V9qu8ltW2W1J-rqOAtC0AR1bymdvWR3TwSmFn1JEiOBHtXAyWW3kDUgK/s1600/debug-t-sql-connect.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjinoCqWmbn6dM1BAdi9EuRivbWft7tMvAHGrGRdZJaFconJy0L-fDjM6hEOA5awL7UNnAcVO5GHKOZOxb6tx10V9qu8ltW2W1J-rqOAtC0AR1bymdvWR3TwSmFn1JEiOBHtXAyWW3kDUgK/s320/debug-t-sql-connect.png" height="320" width="215" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjMmyvg4PZk5S3fuyhAPDjldMNMJR2DGY-XPud97b7F5koNFnFlObmplfg7ws_YrTdaPn2cXZdQ4Dc8MmGvuyapq-_wEoZW7kyjP7U_k-Ma2AFclzTKse-nl0wowyIXM956GY5H_YxaZFC4/s1600/debug-t-sql-project.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjMmyvg4PZk5S3fuyhAPDjldMNMJR2DGY-XPud97b7F5koNFnFlObmplfg7ws_YrTdaPn2cXZdQ4Dc8MmGvuyapq-_wEoZW7kyjP7U_k-Ma2AFclzTKse-nl0wowyIXM956GY5H_YxaZFC4/s320/debug-t-sql-project.png" height="219" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3CkKQGrO2cfcDdsyoKK_zBAQI1mlyVaIWL4GBIca2xedgzY6aL3EI0QmGdM647wBiIHff2CDOaPXBVgkE5hWBr_cXP0yuatGv_FXE8wqdvf4lM-7UeRtWW6jq6RccJQaak6VYdgoNaXY4/s1600/debug-t-sql-open.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3CkKQGrO2cfcDdsyoKK_zBAQI1mlyVaIWL4GBIca2xedgzY6aL3EI0QmGdM647wBiIHff2CDOaPXBVgkE5hWBr_cXP0yuatGv_FXE8wqdvf4lM-7UeRtWW6jq6RccJQaak6VYdgoNaXY4/s1600/debug-t-sql-open.png" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhXxNu20BX-wFp34-v0TYqP_ySP7y_fIOjT7-x77zkrgETmRwmaKcOTAow3f9jnjnTvlm_A4RCaLvR55SouuEOU-dpDx51-b59yk2nMuyLHhCjKN-zxshN0VC4KuheJL1hyLxoheKMF6SYY/s1600/debug-t-sql-step.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhXxNu20BX-wFp34-v0TYqP_ySP7y_fIOjT7-x77zkrgETmRwmaKcOTAow3f9jnjnTvlm_A4RCaLvR55SouuEOU-dpDx51-b59yk2nMuyLHhCjKN-zxshN0VC4KuheJL1hyLxoheKMF6SYY/s320/debug-t-sql-step.png" height="134" width="320" /></a></div>
<br /></div>
Tim Abellhttp://www.blogger.com/profile/18329208508756809573noreply@blogger.com1tag:blogger.com,1999:blog-5082828566240519947.post-73568846200878530892012-05-22T11:10:00.001+00:002012-05-22T11:10:17.222+00:00Enabling TCP/IP in SQL Express 2008 R2Programs > .. R2 > SQL Server Configuration Manager<br />
Network config > Protocols > tcp/ip > enable & properties<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh61f7UV_upd7qnm0TrPic0H6ZcZ3C9XHD9Lpt6-o2GYfbAodbmPzhJVMDamZNEBt7kTgOg2JHlz_Jz9XA7aIjw6fd6FVmA7GyhLWpR2PgdgbU1Knzt_dRZ07BJAfBLuEEwiJFTn2IaXePk/s1600/sql-express-tcp-ip.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh61f7UV_upd7qnm0TrPic0H6ZcZ3C9XHD9Lpt6-o2GYfbAodbmPzhJVMDamZNEBt7kTgOg2JHlz_Jz9XA7aIjw6fd6FVmA7GyhLWpR2PgdgbU1Knzt_dRZ07BJAfBLuEEwiJFTn2IaXePk/s320/sql-express-tcp-ip.png" width="291" /></a></div>
<br />
<br />
Clear the dynamic port under IPAll<br />
Set the TCP Port to 1433 (which is the standard sql server port).<br />
<br />
You can then connect to "localhost" (with no instance specified) in management studio.<br />
<br />
refs:<br />
<br />
<ul>
<li><a href="https://vgoes.wordpress.com/2007/06/05/jdbc-to-sql-server-express/">https://vgoes.wordpress.com/2007/06/05/jdbc-to-sql-server-express/</a>
</li>
</ul>Tim Abellhttp://www.blogger.com/profile/18329208508756809573noreply@blogger.com0tag:blogger.com,1999:blog-5082828566240519947.post-12323098322744844662012-04-18T21:59:00.005+00:002013-09-09T19:58:02.140+00:00Running IE Application Compatibility VPC under Virtual BoxThis post is no longer necessary as microsoft now provide official virtualbox images, yay!<br />
<a href="http://www.modern.ie/en-us/virtualization-tools#downloads">http://www.modern.ie/en-us/virtualization-tools#downloads</a><br />
<br />
----<br />
Microsoft provide Virtual PC images for testing your website with IE. You can download them from <a href="http://www.microsoft.com/download/en/details.aspx?id=11575">http://www.microsoft.com/download/en/details.aspx?id=11575</a><br />
<br />
Note that the XP image has no expired so is no use, it will reboot immediately after login.<br />
<br />
I wanted to make use of the Win 7 / IE 9 image, however Virtual PC is unavailable on Linux. Fortunately VirtualBox can mount Virtual PC's disk images.<br />
<br />
For me the image would get half way through booting windows, and then blue-screen (BSOD). I discovered that it was possible to get past this by removing the SATA controller the machine's settings, and instead adding the disk under the IDE controller. After that the machine booted successfully.<br />
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjkCyr2dspIThejkF1-IkRukxsdClA9mYn-eSAhW8CEX1n8XL9UC-RYS6K-7ZsTXSToTkJgEZaK2zcidU3b8lrCRcpOJP_ka3MYbdyzOdVnUa8mXTp6bxZ1zCg5QIROtRuRjkUQ1EV5_8v/s1600/sata-controller.png"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5732866024933858194" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjkCyr2dspIThejkF1-IkRukxsdClA9mYn-eSAhW8CEX1n8XL9UC-RYS6K-7ZsTXSToTkJgEZaK2zcidU3b8lrCRcpOJP_ka3MYbdyzOdVnUa8mXTp6bxZ1zCg5QIROtRuRjkUQ1EV5_8v/s320/sata-controller.png" style="cursor: hand; cursor: pointer; display: block; height: 266px; margin: 0px auto 10px; text-align: center; width: 320px;" /></a><br />
<hr />
<br />
Capturing the BSOD, basically press F8 after a lot rebooting, and select "disable automatic restart on system failure" (ref: <a href="http://www.webtlk.com/2009/07/02/how-to-stop-windows-7-reboot-loop/">http://www.webtlk.com/2009/07/02/how-to-stop-windows-7-reboot-loop/</a>)<br />
<br />
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5dAZHMhxJQ42TnSZY3q0KLd4Ga0S_hYiSg3opO_sqWIWK6r0k83ffTJr57PmzuErnM77nPteOc0sBKs3b48O0fzGh1K1YP-ckhmNdRhwOjrb7tZfISyZBJcqCL1lQWhnw-osx0rGTQhvU/s1600/bsod-reboot-prevention-F8.png"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5732868196481748498" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5dAZHMhxJQ42TnSZY3q0KLd4Ga0S_hYiSg3opO_sqWIWK6r0k83ffTJr57PmzuErnM77nPteOc0sBKs3b48O0fzGh1K1YP-ckhmNdRhwOjrb7tZfISyZBJcqCL1lQWhnw-osx0rGTQhvU/s320/bsod-reboot-prevention-F8.png" style="cursor: hand; cursor: pointer; display: block; height: 263px; margin: 0px auto 10px; text-align: center; width: 320px;" /></a>And here's the bluescreen:<br />
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-86mS9_tGy1hcA6anEoK-pmB7FDP2C-WmfUMrHU2jgBGcDG9C1ByFC8F7oSfouRlYqsow-JsgNpYiVDC5oTqlhZ-wfQGfmQBiuVtKDFGtfYxMDJWGBgP3naWbNj6PcPjR4rSoFaS1yQ89/s1600/bsod.png"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5732868519923862658" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-86mS9_tGy1hcA6anEoK-pmB7FDP2C-WmfUMrHU2jgBGcDG9C1ByFC8F7oSfouRlYqsow-JsgNpYiVDC5oTqlhZ-wfQGfmQBiuVtKDFGtfYxMDJWGBgP3naWbNj6PcPjR4rSoFaS1yQ89/s320/bsod.png" style="cursor: hand; cursor: pointer; display: block; height: 277px; margin: 0px auto 10px; text-align: center; width: 320px;" /></a>Tim Abellhttp://www.blogger.com/profile/18329208508756809573noreply@blogger.com5