http://www.spiration.co.uk/channel/0 en-us Torkalot christo@uk.com christo@uk.com Running Sonar http://www.spiration.co.uk/post/1443/Running Sonar When manually running Sonar from a cold start to scanning a project, of course ensure that you have your sonar-project.properties file in the project root - something like this: [code] # Required metadata sonar.projectKey=java-sonar-runner-simple sonar.projectName=projectnamehere sonar.projectVersion=1.0 # Comma-separated paths to directories with sources (required) sonar.sources=src # Language sonar.language=java # Encoding of the source files sonar.sourceEncoding=UTF-8 [/code] And then fire up sonarqube and run the runner... main thing here, though is to leave sufficient time for SQ to fire up and start accepting connections - that's why I stuck that 15 sec sleep in. [code] sudo killall java; sleep 3; sudo ~/sonarqube-5.0.1/bin/linux-x86-64/sonar.sh start; sleep 15; sudo ~/sonar-runner-2.4/bin/sonar-runner [/code] Aaaaand, because I am on the lowest possible spec AWS box, I have to kill all java processes beforehand, otherwise it'll just heap out.. The outcome of all this will be a set of results on the SQ dashboard. mount_msdos: Unsupported sector size (36352) http://www.spiration.co.uk/post/1442/mount_msdos: Unsupported sector size (36352) Trying to mount an SD card on my mac, I was encountering this error: [code] knockthrough:Untitled chris$ sudo mount -t msdos /dev/disk1s1 /Volumes/sdcardmountpoint/ mount_msdos: Unsupported sector size (36352) [/code] That is intensely frustrating and if you google this error (as of today), there are only 3 search results offered - none of which answer the problem. Well anyway, I was trying to mount an SD which I am using for a Raspberry Pi so that I could modify hdmi settings within the config.txt file. Unfortunately I had to trash the image on the card and reformat the card using a block/sector size which my mac would accommodate. Easiest way to do this is as follows: [code] knockthrough:Untitled chris$ sudo /sbin/newfs_msdos -F 32 -S 1024 /dev/disk1s1 Password: newfs_msdos: warning: /dev/disk1s1 is not a character device 512 bytes per physical sector /dev/disk1s1: 7742668 sectors in 1935667 FAT32 clusters (4096 bytes/cluster) bps=1024 spc=4 res=32 nft=2 mid=0xf8 spt=32 hds=255 hid=4096 drv=0x80 bsec=7757824 bspf=7562 rdcl=2 infs=1 bkbs=6 knockthrough:Untitled chris$ [/code] This instructs the mac to setup an msdos filesystem on the device at /dev/disk1s1, using the FAT32 format and a sector size of 1024 bytes. To prove that this now mounts, here's the next command: [code] nockthrough:Untitled chris$ sudo mount -t msdos /dev/disk1s1 /Volumes/sdcardmountpoint/ knockthrough:Untitled chris$ mount /dev/disk0s2 on / (hfs, local, journaled) devfs on /dev (devfs, local, nobrowse) map -hosts on /net (autofs, nosuid, automounted, nobrowse) map auto_home on /home (autofs, automounted, nobrowse) /dev/disk1s1 on /Volumes/sdcardmountpoint (msdos, local, noowners) [code] and there it is... christo dd: bs: illegal numeric value http://www.spiration.co.uk/post/1441/dd: bs: illegal numeric value When imaging an SD card for Raspberry Pi, this message probably just means you need to change the 'M' to lower case [code] knockthrough:~ chris$ sudo dd if=~/Downloads/2015-05-05-raspbian-wheezy.img of=/dev/rdisk1s1 bs=1M Password: dd: bs: illegal numeric value [/code] fixed simply with [code] knockthrough:~ chris$ sudo dd if=~/Downloads/2015-05-05-raspbian-wheezy.img of=/dev/rdisk1s1 bs=1m knockthrough:~ chris$ [/code] To Ollie and Alex http://www.spiration.co.uk/post/1439/To Ollie and Alex Written to Ollie and Alex in response to a poem which Alex wrote on Facebook for his loved one. December 2013 Just reading this poem reduced me to tears And forced me to stop and look down the years At all of the times that I failed to impart How I felt to those who are close to my heart. Instead as my own selfish life has unfurled I have chosen to live in my own little world. Well Alex, your words might have changed all of this. Maybe I'll change as my conscience insists. Maybe I'll start by telling my wife What a positive impact she's had on my life. It's strange don't you think how Olli and you Just extended your love to nobody you knew, But to hundreds of people who might just decide That their love for their loved ones is too good to hide. I hope you see each other soon x Install node & bootstrap on debian http://www.spiration.co.uk/post/1438/Install node & bootstrap on debian from new deb box: [code] sudo apt-get update && apt-get install git-core curl build-essential openssl libssl-dev git checkout v0.10.35 ./configure --openssl-libpath=/usr/lib/ssl make make test sudo make install node -v v0.10.35 [/code] yup that works Convert markdown to pdf on mac http://www.spiration.co.uk/post/1437/Convert markdown to pdf on mac Need a quick way on a mac to convert markdown to pdf? If you want a very quick setup which does not require latex (which can be a PITA to set up), try this technique using textmate to create your mardown source, then marked to convert over to html and finally use wkhtmltopdf to do the pdf conversion. First install node, then install marked and wkhtmltopdf as follows: [code] sudo npm -g install marked sudo npm -g install wkhtmltopdf [/code] Then convert the .md file to html [code] marked retro.md -o output.html [/code] and finally convert the html to pdf [code] wkhtmltopdf output.html retro32.pdf [/code] Christo's Hierarchy of Website needs http://www.spiration.co.uk/post/1436/Christo's Hierarchy of Website needs So you want your customers to like your website. Every business does. Ideally they will leave a good comment, or emerge as ‘Net Promoters’. You hope they will come back regularly to purchase your product, or read your blog. Some folks believe that the only way to please a customer is to give them new features, or to make existing features look better. The main purpose of this article is to point out that those people are wrong. Of course new, good-looking features are pleasing to the end user. However the only people who are going to be impressed solely by feature-x, or re-skin-y are the dozen or so mostly-blokes sat around your boardroom table. This dawned on me at a recent off-site with a team at Betfair and the hierarchy of website needs was born. The context was a session where we were planning the delivery of our next big project. Of course we walked through feature requirements, UX desires, the business rationale and the various criteria of success – all good stuff, but we were on a gravy train. What do I mean by that? Well, how would we know that what we have delivered has been a success? My concern was that we could deliver the whole darn lot, but if the finished product just didn’t work as expected, or ran like a blocked drain, we would have failed outright. Cue facepalm. In 1943 Abraham Maslow published his Hierarchy of Human Needs, starting with the physiological needs, progressing through safety, belonging and esteem up to Self Actualization. He stressed that the most basic level of needs must be met before the individual will pursue subsequent or higher level needs. The hierarchy of website needs is similar. [b]It works[/b] First of all, the customer expects the website to work. Pure and simple. When a user visits your homepage, or logs into your application, they do not expect to see a sign on the door saying ‘we are undergoing maintenance – why not try one of our competitors’. If your website is frequently unavailable, or doesn’t meet the basic needs of its intended purpose, then you have ‘bottom of the pyramid’ problems which you need to resolve. You simply do not have the luxury of dreaming up new bells and sprinkles. [b]It’s fast[/b] Many companies, including Google and Gomez have put science behind the understanding that site performance directly affects user satisfaction. In 2006 Akamai revealed that 75 percent of online shoppers who experience a site that freezes or crashes, is too slow to render, or involves a convoluted checkout process would no longer buy from that site. The research also revealed that thirty-three percent of consumers shopping via a broadband connection will wait no more than four seconds for a Web page to render full report here Don’t leave customer experience to chance. Site speed is a requirement, not an optional extra. There is simply no point spending thousands on a new feature, or millions on a new line of business if your customers are going to walk away on first touch. That will make ‘Net Detractors’ of your customers and erode your business. Fast comes first. [b]It’s useful[/b] So your site works and is fast, but you still have work to do if it’s going to be really useful. If a user has to perform five clicks to get to their on-site messages, or a dozen clicks to purchase a product, then you are likely not useful to that individual. Some sites have different levels of authentication, requiring the user to log in twice to access different points of the user journey. Others obscure the shopping cart right up until checkout. There isn’t any point in putting all that effort into making your site work and performant if the user journey sucks. Make useful changes to your product. Reduce time-to-checkout, simplify navigation, and keep communicating through sensible information architecture and signposting. [b]It’s cool.[/b] Cool is only cool if it works, if it loads in an acceptable timeframe and if the user can figure out how to use it. Once you have met those basic needs, you are ready to progress to the top of the pyramid and start truly innovating with your online product. If you miss any of the levels below, your ‘cool’ offering will be lost or wasted on those customers who wait long enough for your page to load. Your online business will either shrink, or fail to meet its full potential. At Betfair, we are starting from scratch, building an entirely new web-serving framework and directly addressing all of these areas of the pyramid at the same time. Our focus, however, is always primarily on the bottom layers of the hierarchy of website needs. Building from that strong base will give us the canvas we need to present those killer features, which together with the other basic needs will make our online business the indisputable industry leader, which we all know it to be. Originally written in 2011 by Christopher Lacy-Hulbert. Reposted here 2014