I recently ran across Dudley Storey’s blog, and it is a treasure trove of HTML, CSS and SVG goodness. My find was his post on SVG responsive maps, which is a pretty slick trick!
Category Archives: Technology
SVN woes
I recently found out that our repository holding the code of multiple projects for the past 8+ years wasn’t being backed up properly. What’s worse, the reason it isn’t being backed up properly isn’t because we have no backup in place, no, it is because the repo is corrupt. HOORAY!
This revelation has led me on a long, strange trip, and I have tried many things so far in an attempt to save some of our history (though it is not looking good). One of the interesting things I read was an idea to use svnsync:
Another approach I forgot to recommend before is to setup a user in the original repository that has read permission only to your branch, and then use that user to create a mirror of the repository using svnsync. svnsync will honor the permissions in your access file, and will simply omit the stuff that user can’t read, leaving you with a repository that has a bunch of empty revisions but contains all the changes made to your branch only.
I found a great post on using svnsync and had a go. While this is a pretty slick trick, it unfortunately did not work. You, long ago when the repo was corrupted, I was tasked with “fixing” the repo. My “fix” allowed us to keep on using the repo, but it effectively made the repo worthless since my “fix” was to remove the corrupt db rev file – not a good idea…
Anyway, now we are stuck with a repo that is full of work and no way to export it easily with history. Luckily 3 years in code is like dog years, so much of the code from before the corruption occurred is not really used. My latest trick to attempt is dumping a range after the corruption, then use svndumpfilter
to try and save history for relevant projects. This post gives a nice outline of the steps involved to perform a task like this.
Unforunately, some stuff is just going to have to get added to the new repo and we are going to lose history, but we can keep the current repo running in a read-only state for that. In the end, it turns out this is all for the better – we made the mistake of putting binaries into the repo, and it is out of control at over 14GB. Time to prune that sucker…
jQuery Download Plugin
I was in need of an “export” button to export some data to a CSV file, but the data changes based on some other choices. I added my js to export the file and then – DUH! You cannot use ajax to return a file. Silly me… 🙂
I figured I could wrap a form around the button and set a hidden input and blah blah blah. I googled and found the above, which basically does all that for me and gives me a convenient 1 liner to work much like an ajax call would but allow for a “save as” dialog. It is pretty neat-o!
MediaBrowser3
For some time I have wanted a nice media experience for playing back my music/movies. I also wanted something that would make it nice and easy to play content over the internet when I travel. I was considering just writing something from scratch just for the experience, but then I thought, “why reinvent the wheel?” and I opted for an existing media server package.
First I tried Plex. I have to say it is pretty user-friendly, but it does have its quirks. For example, certain media tags would not update properly, and no matter what I did I could not figure out how to get the “agent” (the code that fetches the metadata) to work. Also, when I wanted to extend some functionality I found out the source is closed, so that really put me off.
While looking into how I could extend Plex, I ran across info for MediaBrowser3. The codebase is in C# and it is open source (github repo), so I knew that I could do with it as I pleased. I installed it and was very pleased.
MB3 is the next version from an established MB2, so there are some things that are still in flux, but the dev community is very active. I saw a call for devs to join the team, so I did. I have always wanted to join an open source project, but I have always been a bit intimidated by the prospect as well. I have to say I am very happy I did drop them a line to join because the experience has been great and the community is fantastic – and very supportive and appreciative of all the devs! 🙂
Personally I have focused on a redesign of the video player interface, and recently I have started to play with the chromecast SDK to enable casting from the MB3 web client. Speaking of clients, there are many to choose from: desktop clients, mobile clients, the web client, whatever floats your boat.
If you have been in the market for a great media server, I’d suggest checking out MB3. And if you are a developer, visit the community forum and leave a message on the “join the team” post. Even if you are not a dev, there are still other ways you can support the project through documentation or language translation.
HTML5 Rocks!
HTML5 Rocks looks like a pretty slick site for some nice HTML5 wizardry. I haven’t done a deep dive into the site, but a quick perusal of the contributors list shows a variety of devs (including lots of Googlers). Check it out…
Blacklisting with Project Honeypot
The other day I was looking at the traffic coming in to one of our sites and I saw some semi-suspicious traffic. turns out it is some sort of crawler, but that it has been linked in the past to some sort of trojan. This got me wondering how I could easily block traffic from an IP or a range of IP’s. I did not really want to use IIS to block IP’s, or have to enter individual IP’s (or ranges for that matter) into our firewall. I was looking for something a bit more automated.
A quick google turned up this post for an HTTP module. The module uses the blacklist from Project Honeypot. All one needs to do is signup for the PH api, make some minor modifications to the module and you are off an running.
A little more googling turned up another HTTP module on Github called BlacklistProtector. I did not look much at this code, but I imagine it is pretty similar and likely requires an api key as well.
One thing I did notice in the comments section of the first blog post is that the original creator of the module claimed PH had too many “false positives”. Granted, the comment was from a few years back, so it may not apply these days, but it is something to consider. I haven’t implemented the blacklist handler, but I thought it would be useful to allow for some method of overriding IP addresses. Perhaps when I finally do implement the handler I’ll add this capability. If I do, I’ll be sure to put the code up on Github and update this post with a link.
LightSwitch
First of all, WOW!
I had heard about LightSwitch, but I always got that same vibe as I am sure everyone else did – that it was a bit of a “toy”. I never really got into the whole Silverlight LOB thing, so I did not really think tweice about LightSwitch. Plus the whole sepearate download thing…
As Michael Washington said in an interview when asked if LightSwitch was a bit too basic for the “hard core” developer:
It’s in Visual Studio, so if you aren’t already a person who would open up Visual Studio it is not the product for you.
That pretty much puts things into perspective.
I needed a reporting solution, and I wanted something fast and simple. I know I cannot give a report builder to a marketing person and say, “have at it!” They won’t understand the db schema, and I would just wind up building the report myself. I decided it was the right time to give LightSwitch a go, and man am I impressed!
With Visual Studio 2012 Update 2, LightSwitch 3 was released. Included in LightSwitch 3 is the ability to create HTML5 clients. It is pretty darned awesome! LightSwitch makes getting started simple, but if you want to dive-deep you can. I was able to take our db and throw together a couple of sample reports in minutes. I even made a couple more while demoing LightSwitch for my peers – it is just drop-dead simple. However, don’t let the simplicity fool you – there are plenty of hooks to get in deep.
LightSwitch uses jQuery mobile, so it can use all the cool jQuery stuff out there. Wijmo is building LightSwitch-specific implementations of their widgets that should be in beta soon, but you could just use the current Wijmo widgets with a little elbow grease.
I am so stoked to get to using LightSwitch. I was dreading making these reports, but now I am actually excited. It will be so easy to make them that it will actually be fun. Whodathunkit?
Resources
Wijmo
I just found out about Wijmo. Wijmo is a javascript widget library that utilizes jQuery, jQuery UI and knockoutjs. Using jQuery UI allows the widgets to be themed easily with any of Wijmo’s premium themes, the canned jQuery UI themes, or rolling your own with theme roller.
Wijmo costs if you want to use it in a commercial application, but they do have an open source option that allows for use in GPLv3 projects.
CodeRush with Refactor! Pro
I am stoked! I was finally able to get a CodeRush with Refactor! Pro subscription. I cannot wait to get started with it.
I was a long time CodeRush Xpress user, and I have to say for a free tool, CodeRush Xpress is pretty awesome. I remember doing some pair-programming a while back with one of my co-workers and he saw me use a refactor. He stopped me and said, “how’d you do that?” I showed him CodeRush Xpress and he was off to download his own copy.
A couple months back I was finally able to make the jump to VS 2012 from VS 2010. As much as I enjoyed CodeRush Xpress, there were some stability issues that I had with VS 2010, and I think Xpress contributed to those issues. I am a bit of an “extension junkie”, so I am not sure if it was a combination, or maybe it was just some other plugin entirely. I could be giving Xpress a bum rap, so please try it out for yourself. It is free after all…
When I started my 2012 adventure, I decided to scale back the extensions, but I really did miss CodeRush Xpress, so I finally worked out purchasing a Pro license. DevExpress customer service is awesome. I had some questions and concerns, and they were totally responsive and willing to work with me. Special thanks to Vache – I really appreciate it.
But don’t just take my word for it. From devlinliles.com, who’s post helped sway me towards getting a Pro license even though he ultimately chose ReSharper over CodeRush:
I completely agree on the support side of things. CodeRush has this nailed. I tweeted some problems and got *positively* bombarded with answers and resources. The support they offer is second to (none) with tooling out there.
So, my next adventure begins. I cannot wait to get started. I am sure I’ll have plenty of follow-up posts to rave about all the great features of CodeRush!
🙂
SVG Patterns
SVG Patterns is a great site with many examples of using SVG patterns for backgrounds.
SVG patterns have the benefit of being scalable (they are vector graphics) while typically being smaller than bitmap graphics. They also are have more browser support than CSS3 gradients.
The site links to code samples for each pattern on Codepen so you can test them out, fork them and play with them, etc.
CSS3 Patterns
The idea behind SVG patterns was inspired by CSS3 Patterns, which is pretty cool.