Subscribe: Codestore Activity Log
http://www.codestore.net/store.nsf/rss.xml
Added By: Feedage Forager Feedage Grade B rated
Language: English
Tags:
add  blog  button  data  date  document  field  find  icon  rockall  sql  time  user  virgin media  virgin  work  year 
Rate this Feed
Rate this feedRate this feedRate this feedRate this feedRate this feed
Rate this feed 1 starRate this feed 2 starRate this feed 3 starRate this feed 4 starRate this feed 5 star

Comments (0)

Feed Details and Statistics Feed Statistics
Preview: Codestore Activity Log

Codestore Activity Log



Latest ten updates to codestore, be they blogs or articles.



Last Build Date: Tue, 14 Jan 2014 07:05:19 -0500

 



A Tool I Made To Export From Notes to SQL (ETL) | Blog

Tue, 14 Jan 2014 07:05:19 -0500

As I watch all my customers leaves Notes/Domino behind, all I can do is try and assist as best I can. As part of this process I've found myself creating a Notes-to-SQL export tool.

 

(image)

The tool is Notes-based and involves the following three part process:

Step 1. Loop through and analyse every single document in the target database and build a list of all unique combinations of Form + Field + Data-Type. For each combination it finds, a Notes document is created which lists the Form name, the Field name and the type of data (text, Authors, Rich Text, Numbers etc)

The resulting list is then analysed and any duplicate fields (conflicting data types) or unnecessary fields are removed.

Step 2. Taking the results of step 1 it then builds the SQL tables (using the document's UNID as the table's primary key). For each form it creates a table of the same name. For each field related to that form it creates a column in the SQL table with the equivalent data type.

Step 3. Finally, step 3 populates the SQL tables with data by once again looping ALL documents in the database and exporting each document to a new row in SQL according to the map of form-fields we've decided on.

Once it's done we can then go in to SQL and define relationships between parent/child document by joining the tables in a Database Diagram. Although as an enhancement to the tool it could be a part of the export process that we define these rules.

As part of the initial configuration of the tool you can tell it which Forms to ignore, which fields ignore, which fields to always treat as UNIDs etc.

Once the data is in SQL then you can do the T and L of the ETL process.

Attachments?

For attachments there's a special table called Files which stores the UNID and filename of any files found during the export. These files are detached to disk and the path to them stored in the "Files" table. For any given row of any of the SQL tables you can find the associated attachments by looking in the Files table for a matching UNID.

Taking it To Market?

I've always known I need a product to sell. Could this be it? It's some way off being ready to sell directly off the shelf. However, with some support from yours truly I reckon it could be used in most situations or tailored to work where it doesn't quite fit.

If you're interested in using the tool to migrate data from Lotus Notes to SQL Server (or any other RDBMS system) then drop me a line on jake.howlett@rockalldesign.com.

(image)




The Perfect Desk Quest - 2013 Update (Part 2) | Blog

Wed, 11 Dec 2013 04:09:14 -0500

Back in March I updated you all on how my on-going quest for the perfect desk was coming along. Here now is another update.

Question: Can you ever have too many monitors or enough "real estate" desktop size?

Answer: No!

Here's how my desk looks now:

(image)

From left to right, there's a (newly-added) Dell U2713H (showing OS X), a Dell U2711 and a Samsung SyncMaster 245B (both showing the same Windows 7 PC). All in there are 9,676,800 pixels glaring back at me!!

Aside from adding a brand new monitor (which, by the way is amazing and I can't recommend it enough) the main difference is that there is only one keyboard and mouse, which shared between Win and Mac using Synergy KM.

Synergy is brilliant and, again, I can't recommend it enough. It's been recommended to me on here previously, several times. Why oh why I didn't try it out before I don't know. Well, I do. It's because I don't like the idea of having to run daemons on my PCs. Which is a stupid reason and I'm so glad I saw sense.

It's like a kind of magic seeing your mouse move from Windows to Mac without even the slightest hint of a lag. For the first day or so I'd just keep needlessly moving between the two just to watch it happen. After a while it's almost possible to start thinking of them both as the same PC!

The mouse itself has to move about 3" to travel between the extremities of all three screens!

I use the Mac Mini for video editing, the occasional PHP coding (Coda 2) and for running various versions of Windows inside Parallels virtual machines for testing sites in different versions of IE. Until now, using the Mac wasn't great. The monitor was small and attached square to the wall. To use for any length of time meant moving one keyboard out the way, moving over the other and re-positioning my chair. The old monitor was also too small to do OS X justice or for any kind of effective video editing. All those issues have now been resolved.

is it my perfect desk though? No! But it's, way, way, way better than before. Not perfect though. The quest continues...

(image)




Recovering a Laptop After Forgetting Windows and BIOS Password | Blog

Wed, 4 Dec 2013 03:23:37 -0500

My sis-in-law loves a bargain (she's from Yorkshire!) and recently rang to ask me (via her sister, my wife) if I'd be able to recover a laptop she'd been offered, before she went ahead and bought it.

Apparently the owner of the laptop had forgotten the Windows password and had written the laptop off as worthless, so was willing to sell for next-to-nothing. I said yes, I'd able to do something with it.

What I didn't realise was that it might have a BIOS password, which it did!

Initially I'd thought it would be as simple as sticking in a Windows install CD and building from scratch. However, without the BIOS password I couldn't change the boot order of the disks to get it to boot from CD.

I tried Google and there's lots of complicated hacks out there, as well as BIOS removal tools for sale. None of the hacks worked for me. Nor did stripping the laptop down to hot-wire jumpers or remove the CMOS battery (which was un-removable).

Then I had a brainwave.

The Simple, Fool-Proof Solution

If you find yourself wanting to boot from CD on a laptop (or PC for that matter) where you can't modify the BIOS try this:

  1. Remove the hard drive
  2. Insert the Windows install CD
  3. Start the laptop
  4. Hope that BIOS fails-over to the CD after not finding a hard drive
  5. If it boots from the CD, while that's happening, quickly re-insert the hard drive.
  6. By the time Windows is ready to install the hard drive will be there
  7. Remove the old disk partitions and start afresh

Hey presto. Worked for me. Hope it helps somebody else.

(image)




Rockall Design Now in its 11th Year! | Blog

Fri, 1 Nov 2013 04:59:02 -0500

Rockall Design ltd (the little company I run from the office-slash-garage in my garden) was 10 years old yesterday. It's customary on this day each year that I plot a chart of turnover growth over the years. So, here it is:

(image)

As you can see it's been a bumper year.

Last year I put down what, at the time, I thought was a good year to:

Long hours and 'hard' work. But mainly luck!

This year is much the same. Although, if I thought I was doing long hours back then I had no idea what was in store this past year.

I was reluctant to show the chart as it may seem like I'm showing off and nobody likes a show off (note however that I leave the actual number involved a mystery). Suffice to say, I would have posted the chart no matter which direction the line would have gone this year.

At What Cost Success?

I hear people talk about this thing called a work/life balance, whatever that might be. It's gotten to the point for me now where all I seem to do is work. Not only that but, when I'm not working, it's work that I'm thinking about and I find it hard to switch off. Luckily I love what I do. But there are other things I love. My family being top of that list.

I used to have a self-imposed rule of not working at the weekend. Lately even that golden rule has gone out the window.

People sometimes say to me "I'd love to work from home" or "It must be great being your own boss". At which point I normally snap up the chance to poor my heart out about the loneliness and how you're never your own boss. You will always have a boss and answer to somebody.

Once upon a time I had a group of friends I saw regularly and had a few hobbies I enjoyed.

Then there's this website! What happened there?! Well, if you turn my company growth chart upside down, it could just as well be a plot of the number of readers this site has had over the years. As my takings have shot up over the last couple of years the readers of this site have plummeted.

I'm overdoing it on the moaning though. In reality I'm happy with how things are. I'm earning more money than I ever dreamt possible. I know it won't/can't continue and I'm making sure I make as much hay as I can while the sun's shining. Being self-employed means I have to provide for my own retirement. I'm not greedy or obsessed by money, but it would be crazy for me not to take the opportunity to capitalise on any chances I'm given to earn. 

Still Domino?

I'm sure the question on everybody's lips (well, at least on those of the people who've not stopped reading the site) is "what technology is earning your crust just lately?".

This time last year I said it was Lotus Domino that was responsible for most of Rockall's turnover. This year however the picture has changed and, whilst Domino is still in the equation, it's now Microsoft Dynamics CRM and ASP.Net MVC that I'm working with.

Whether Dynamics CRM remains in the picture long term or not I don't know. It certainly feels like it's got a brighter (more lucrative) future for it than Domino does. It's an interesting product and hopefully I'll find time to write about it here soon.

Right, back to work. So much to do....

(image)




Using Font Awesome Icons in Fireworks | Blog

Mon, 14 Oct 2013 04:51:45 -0500

  The font-based web icons from Font Awesome is brilliant. Especially when used in conjunction with Bootstrap. You can quickly and easily add any one of the icons to your HTML buttons (or many other elements for that matter). Like so: Sometimes though, you can't use web fonts. Either you can't rely on them being supported or, for some other reason, you just want to use an image file. That was the case for me recently and I wanted an image file of an exclamation mark. Here's how easy it was using Font Awesome and Adobe Fireworks to create images based on font icons. First step is to download and install the Font Awesome font to your PC. Then open the Character Map program and select the Font Awesome font, as below: In there you can view, select and copy any one of the icons. With it copied to the clipboard, you can then switch to Fireworks, start a new canvas, select the Text tool (or press "T"), click on the canvas somewhere and paste in the icon. You can then resize and re-colour as you wish, as below: Note that Fireworks is a vector-based drawing app and you can break apart (Ctrl+Shift+P) the icons so that you can re-define their shape by dragging corners and points around, like below, where, for no particular reason, I've made the point wider: The only limit is your creativity (or lack thereof, as shown here). Hey, look, I made a download button with a picture of a cloud in it: If you get stuck trying to find the icon you want from within Character Map then here's a tip that may help. Find the icon on the website and on there they show you the Unicode code, which you can type in to Character Map to find the icon, as below. Have fun! Future of Fireworks Fireworks is brilliant. Why of why Adobe have decided to scrap it I don't know. I only hope it either goes open source or the version I currently own keeps working for as long as I have need of a graphics tool. [...]



Document Action Logs, Including "Limitless" User Comments | Blog

Wed, 25 Sep 2013 04:38:07 -0500

Action Logs are something I'm sure we've all added to the bottom of a Domino web form. Here's an example of one I added to a recent Domino-based app I created and then wrapped with Bootstrap. The log is shown to the user as a three column table(when, who, what) with the latest action first. My approach to storing this data has always been to use a single multi-value text field. The value stored might look something like this:24/09/2013 17:08:12^^24 Sep '13^^17:08^^Joe Bloggs/ROCKALL^^Document Created 24/09/2013 17:08:12^^24 Sep '13^^17:08^^System Admin/ROCKALL^^'New Document' email sent to related users 24/09/2013 17:21:57^^24 Sep '13^^17:21^^Jake Howlett/ROCKALL^^Status changed to Published 24/09/2013 17:21:57^^24 Sep '13^^17:21^^System Admin/ROCKALL^^'Document Published' email sent to related users This field is built up by recurring calls to a LotusScript method called LogAction() in the WQS agent of the document. The HTML table the user sees is generated in a Computed Value section that uses an @For() loop to create a for each entry in the log. There are inherent limitations to this approach: Limit of the amount of data the backend field can store. Limit of HTML the Computed Value that displays the table on the web can store. These limitations can be worked round, but for the majority of cases the above solution will suffice. Adding Comments The limitations became an issue recently when I was tasked with including user's comments in the Action Log. So that the log would look something like this: Notice the comment on the 2nd row down!? By adding comments, the chance of reaching the data limitations has greatly increased, becoming almost inevitable. To avoid the limitation I chose to add each individual comment in a field of its own. Each time an action is performed and logged with an accompanying comment a field called ActionComment_X is added, where X is the number stored in a field called ActionCommentCount incremented by 1. The backend documents start to look like this: Then, in the ActionLog field we add a reference to this comment field as an extra delimited field on each line. Notice in the values below that the 3rd line down ends in ^^ActionComment_124/09/2013 17:08:12^^24 Sep '13^^17:08^^Joe Bloggs/ROCKALL^^Document Created^^ 24/09/2013 17:08:12^^24 Sep '13^^17:08^^System Admin/ROCKALL^^'New Document' email sent to related users^^ 24/09/2013 17:21:57^^24 Sep '13^^17:21^^Jake Howlett/ROCKALL^^Status changed to Published^^ActionComment_1 24/09/2013 17:21:57^^24 Sep '13^^17:21^^System Admin/ROCKALL^^'Document Published' email sent to related users^^ When the HTML table is generated and each line in the ActionLog field is exploded on the delimiter ("^^") we can simply add the value stored in the comment field, like so:@If(@Word(log[n];6)=""; ""; @GetField(@Word(log[n];6)) All that remains is to markup the comment in a
tag and add a sprinkle of CSS to make it look like a quote. The only remaining issue is that, if people type in huge great long comments, the amount of HTML generated by the Computed Value quickly reaches its limit. To get round this I added an ellipsis (copying off Gmail a little) to the end of a truncated comment like so: Clicking on this ellipsis "button" uses Ajax to go fetch the rest of the comment. It's a solution I'm happy with and I've been sitting on for a while, thinking of sharing. Just don't know what interest there is? If there is some I can build a demo/download. [...]



Bootstrap Advanced Date Picker Plugin | Blog

Fri, 6 Sep 2013 03:09:01 -0500

For some time now I've been creating date fields in Bootstrap-based websites that look like this: Clicking either in the field or on the button next to it launches a date-picker, like this: In the Notes Form the Date Field is configured in such a way that it accepts dates in the format 12-Dec-2009 (while storing them in normal Notes DateTime format of course). The field properties are like so:   It all works well and users like them. Not least because there's no confusion over whether it's mm/dd or dd/mm! When the document is viewed in read-mode the dates are displayed in the same format automatically! The only downside is that the field is marked up as "readonly" to prevent users trying to type in their own dates, which forces them to use the picker. Ok for most, but if you want to pick a date 10 years ago.... I'm assuming you're using Domino, but this is by no means restricted to use only with Domino. Taking it Further I was asked recently if a certain date field could be extended to add the ability for a user to choose from a list of predefined date ranges. Such as "A year from now" or "3 months from now". Such is the beauty of bootstrap that I was soon able to extend my date field by creating a plugin that adds extra button, as below: When clicked on, it looks like this: Happy days! How Did I Do It? Creating the basic date picker is a simple case of marking it up like this:
Then at the bottom of the page (or better still, in an "form.init()" function called on "dom ready") do this:$(function() { $("input[rel='date']").datepicker({dateFormat: "dd-M-yy"}); }); This code looks for all fields where rel="date" and binds the jQuery UI date picker to it. Hey presto. Advanced Version To make the version with the additional dropdown, the HTML markup for the field changes to something like this: It should be obvious from that HTML how it all works. Maybe it's obvious to me as I'm au fais with Bootstrap? Turning It In To A Plugin While the HTML markup needed to wrap round a field to make it a datepicker isn't complicated you can imagine it's a bit of a pain to markup lots of date fields. What we really need is a plugin. To create a plugin you'd simply add the following code in to your main "application" file:(function( $ ) { $.fn.datePicker2 = function(options){ var settings = $.extend({ dateFormat: "dd/mm/yy" }, options ); this.datepicker({dateFormat: settings.dateFormat}) //Initiate the datepicker .attr("readonly",true) //Make the field itself readonly! .wrap('
') //wrap it in all a div .after($('') //add a button after the field .click(function(){[...]



Quick Tip: Login To Same Site as Two Different Users | Blog

Tue, 20 Aug 2013 12:52:33 -0500

Here's a tip I discovered kind of by accident in one of those "I wonder if" moments.

It came about after discovering a Fiddler tip that lets you trace localhost http traffic. The solution is simple: you simply add a trailing space, so that you surf to http://localhost./

At first I'd assumed that this was some odd quirk in the way browsers handled host names. Turns out it's actually working the way it should. Technically speaking all FQDNs should have a trailing space, in order to make them absolute. More here.

It's not just localhost. By way of an example the following two links both work

www.codestore.net

And:

www.codestore.net.

But, what's the tip?

My tip is that you can use the above "hack" to login to (most) websites using two different identities at the same time.

Oftentimes you want to test websites as two different users (even if one of them is "anonymous") and find yourself logging in and out as each user constantly.

Well, using the same browser, you can login as "User 1" at the site with no trailing dot and then as "User 2" in the site with the dot!!

Since discovering this a couple of hours ago it's already saved me an inordinate amount of time.

I know you can always do this by using different browsers (User 1 in Chrome, User 2 in IE) but it's normally the case that using the non-system-default browser ain't so straightforward.

(image)




How To: Virgin Media + BT Infinity = Reliable Internet Connection? | Blog

Mon, 12 Aug 2013 05:02:05 -0500

The quest for an always-on internet connection is almost at an end! As if to assure me it was worth it, within 24 hours of Virgin Media connecting my secondary (failover) broadband connection the "primary" BT line went down. Again. For the third time in as many months. This time, however, I was prepared and had a backup connection and could carry on working. The BT engineer that came this time was very helpful. Bordering on apologetic for the fact I'd had so many visits of late. So much so he gave me his phone number in case it happens again and he'll try to personally fix it. Apparently, the reason for my repeated issue is a dodgy chip on the card in the cabinet. He asked to be allowed to move my to another card but "they" said no. He logged the card as faulty, but said it would "be months" before anything is done. For now though both are online and it was a massive relief to see both WANs go green on my router, as below:   With load-balancing enabled between the two WANs I'm getting the following speeds according to Broadbandspeedchecker.co.uk Not that I'm overly-bothered about the actual speeds I get. In fact I don't care at all about the speed. All I care about is reliability of the connection. Which is what I feel I now have. Whether the Virgin connection is any more reliable than BT's remains to be seen. The reliability, I'm hoping, will stem from the fact it's unlikely (touch wood) that both will develop problems at the same time. How It All Looks For the curious, this is how it all looks: What you can see above (front door on the left and cellar on the right): 1. The BT line which comes across the street, down the house, through the front door's frame and then down in to the cellar. 2. The Virgin Media cable comes out the ground, through this brown box, through the wall and across the cellar. 3. The BT line comes in to this master socket and then an RJ11 cable connects it straight to the router (6). 4. This is the coaxial cable from the Virgin Media (2) and connects to the back of Virgin's "Superhub" (5) which is their supplied router. It's connected to the WAN2 port on the router (6) using the green patch cable. 5. Virgin Media's router which is operating in "modem only" mode. 6. The Draytek Vigor 2850 router. Notice it's the non-wifi version. The red patch cable you can see goes off to the loft, where the WAP lives. I find the WAP provides much better whole-house coverage when it's above the rooms (no brick walls to go through). That's all there is to the kit needed. Notice the lack of a BT OpenReach modem. Not using BT's kit means I'm breaking their T&Cs and am unsupported. The BT modem is in a cupboard. Primarily because it's the property of BT, but also because if I have to call out a BT engineer I need to plug it back in before they get here and pretend it was always there. BT (apparently) charge ~£180 for a callout where it turns out to be a problem with your own kit. Before you log a call be sure to plug BT's modem back in and check that that too can't connect. Don't mention the non-use of a BT modem when you call your broadband provider! As far as configuring the Draytek router goes this is something of a pain. Once you have it working make sure you use the router's Configuration Backup function to store the config somewhere safe. Then leave the router be. Getting it working took me way longer than I'd hoped. I'm not going to talk about you do it in detail. All I will say is that if you can't get it to work following the online guides, then call Draytek's "internet connectivity helpline" which is how I finally managed to get it working. Noteworthy Points: Setting up the Vigor for use with BT Infinity (in particular note the part about VLAN Tag Insertion!) Setting up email notification for WAN failures Setting up dual WAN failover/balancing  Again, I can't emphasiz[...]



Modern Day Communication Reliability | Blog

Thu, 8 Aug 2013 03:49:17 -0500

Two weeks ago today I mentioned that I'd ordered a Virgin Media cable internet connection as a redundant 2nd connection in case my first goes down.

Today the engineer is due to come and connect me up. Yep, a two week wait to get connected. Luckily I'm already on the internet, otherwise there's not a chance I'd ever wait that long.

Anyway, I booked a date and the AM time slot for the visit and went about "waiting". Then, yesterday I got the message below:

(image)

 

Which sent my overly-paranoid and analytical mind in to overdrive.

These kind of text-based (non verbal) systems concern me. Note that I got no reply to my confirmation reply to say "Thanks for confirming". I now have no idea whether the engineer is coming or not. The time slot was 8am-1pm and it's now gone 10am...

Did I get my confirmation reply wrong maybe? Should the postcode have been all uppercase? With no space? Maybe the "+" sign is needed? Maybe "confirm" should also be in upper-case!?

I have no idea whether it's a) a person at the other end reading it or b) a PC with a badly written and intolerant string parsing function.

It reminded of something I said on Twitter a while back:

(image)

Dear Virgin Media, if you want to confirm that I still want the timeslot I've been waiting two weeks for, CALL ME.

If I had been waiting patiently for 2 weeks for a connection and then took a day off work to wait in, only to find that nobody came because, oooh, I dunno, your SMS didn't arrive, or my reply didn't, or I lost/damaged my phone, or changed my number, or I had my phone turned off, or my kids were messing with my phone and marked the SMS as read, or any other scenario that really could happen, I'm going to be pissed off.

It's the kind of conversation I get in to with my customers when "brain storming" ideas revolving around communication with their customers. Even the best ideas come with a myriad of "But, What Happens If..."

(image)