Thursday, September 5, 2013

Scripture Scroller!

In our family, we most often have scripture study in front of the home theater PC (HTPC) with the audio available from http://scriptures.lds.org.  We like to follow along as the scriptures are read to us.  One problem we've had, though, is that our keyboard for the HTPC is a little flaky, and keeping the screen up-to-date with the audio is inconvenient.

The problem-solver in me woke up and decided to find a way to automate that process.  So I came up with a javascript to solve that problem for me (in Chrome, at least).  You can analyse the source of this page if you're interested in what it is, but to use it, drag the link [Scripture Scroller] to your bookmark bar.  Then when you've loaded a scripture page on LDS.org, hit that bookmark and as long as the audio is playing, the page will scroll along with it.  You can hit to start or stop the audio.

Let me know if it works and how you like it!

By the way, I've tested it on a couple of other pages where you can play the audio that is the text on the screen and it seems like it works there as well.




Thursday, August 16, 2012

Agile 2012!!

Some of my many imaginary readers will be aware that I've been in Grapevine, Texas attending Agile 2012 for the past week.  It's been a fantastic conference, and I thought it would be good to document some of what I learned before it all leaks out of my head.  So here it is:


Monday:
We started the day by registering, getting our swag bags, and sitting near a “if it’s your first time” presentation.  Nothing terribly useful there.  Then at 9:30, we all went to Simple Design Applied: Spend More Time Creating Valuable Code.  The main focus here was on writing code using simple design.  By simple design, we don’t just mean design that is simple.  Instead, they defined simple design as the following four rules:
1.       All tests must pass
2.       No code is duplicated
3.       Code is self-explanatory
4.       No superfluous parts exist
 In the name of simplicity, the presenters then whittled these four rules down to do, taking the others kind of as a given:
·         Remove duplication
·         Fix bad names

It was a great reminder of how to think about the code we create.

Next, we went to Better Code, Littler Classes: Refactoring to Separate Concerns.  In this class, we started with a fairly simple wiki project that was on flash drives at each table.  We worked together through several different refactorings to make the code easier to understand, having smaller methods and classes.

Tuesday:
Tuesday morning started slowly, with Bob Martin’s Clean Code presentation.  This is an always-useful rehash of what Uncle Bob’s been preaching for years.  If we’re professional programmers, our code should be well written, which means something a whole lot different than “it works”.  I’m sure I would benefit from seeing this talk every year, possibly less.  Uncle Bob’s energy is refreshing and contagious.   He also talked about laser pointers, and the $12 ultraviolet one he got on Amazon.

Next I attended Testing System Qualities.  This was a thought-provoking session about what aspects of quality we should be testing, and when.  The answers tend towards all and earlier, respectively.  One major takeaway for me is that we should be doing availability/load testing on much more than we are, and a way to do so came to me during the session (see previous email).

Wednesday:
I started the day Wednesday with Does Pair Programming Have to Suck.  This was a great discussion about some do’s and don’ts in helping people want to pair.  It contributed to one of the loudest messages that I got from this conference, and that is that you can’t force agile principles on people.  You can make a personal commitment to follow them yourself and you can work hard to help others see the benefit, but as soon as you take away someone’s choice, you’re likely to create a bias and waste all the benefits of agile methodologies.  The main message that was intended from this session is that pairs need to be willing to be vulnerable for pairing to be most successful.  Trust is vital.

Next we had another chance to see Bob Martin in Craftsmanship or ‘The only way to go fast is to go well’.  This was a fantastic new session type where they have a couch, a chair and a coffee table on a platform in the front of the room, and, after a brief opening statement from Uncle Bob (for those who don’t already know, Uncle Bob is Bob Martin), anyone who would like to can go sit on the couch and have a comfortable chat with Bob about whatever they feel like.  Like most people, I was hoping to find a magic bullet that I could use to force people to enjoy the benefits of pairing.  Another person asked my question about this, and Uncle Bob reiterated a previous message that you can’t force it.  So I decided to take the question to the next step and asked about how to overcome biases against clean code in an organization.  After some playful “Hi Bob, I’m Bob.” “Oh nice to meet you Bob.  How’s it going, Bob”, he suggested that a key to making the organization progress is requiring the results of professionalism, rather than the mechanisms.  For instance, if a team or person doesn’t want to pair/test drive/[insert agile practice here], don’t make them.  Simply require the results that would come if they did.  At some point, they are bound to notice that other teams/programmers are able to attain these results, and will want to find out how they can too.

We ended Wednesday in a fantastic pairing exercise called Hands on Keyboards! Coding with Corey Haines.  It was here that I learned that a gentleman we had been speaking with casually somewhat frequently was the Corey Haines.  Now Corey is no Bob Martin, but he’s in the same class.  A name that I’ve heard in many conversations about how to write code and nerdy stuff like that.  Matt and Parker were very entertained when I looked that them and said “That’s Corey Haines!  We’ve been speaking with Corey Haines!”  In the session, we worked to create a Conway’s Game of Life simulation using pairing and TDD, but with some very uncomfortable restraints: no method may have more than 4 lines; no method may return anything other than void or this; method calls cannot accept primitive types or collections; constructors and private methods may take primitive types.  This was probably the most fun session from the whole conference.

Thursday:

I started with an excellent session called Deliberate Practice – becoming a better programmer.  In this session, I participated in a FizzBuzz randoori in Java about good names and removing duplication.  Then we talked about how to enable developers to improve themselves through practices like this randoori.  A significant takeaway from this session is that we can and should be doing weekly randoori sessions at 1-800-Contacts.  There are certainly enough developers that would be interested to make this successful.  After this session, I had a lengthy chat with Bill Hanlon of Microsoft.  He said that measuring and reporting on bug lifetimes (the time from bug submission to bug closure) has been his most useful metric for getting teams to improve overall quality.

The last session that I saw was again Bob Martin, presenting Demanding Technical Excellence and Professionalism.  This was mostly a rehash of what he’d said in the previous two sessions that he did, but was again energizing.

I think the main thing I’ve learned over and over at this conference is that you can’t force agile on people – you can constantly improve yourself and you can employ metrics that clearly demonstrate the benefits of agile practices.  Those around you that are interested in improvement will catch on and join you, if they’re not forced.

Thanks to all the organizers and presenters, and thanks to 1-800-Contacts for sending me!

Sunday, January 22, 2012

DVD Archiving

I was recently asked about what a good setup for ripping and watching DVDs without having to handle the DVDs.  I'll cover how I do it, and some of the other options for how it could be done.

So, starting at the "top", you need something to watch on, eh?  For simplicity's sake, a TV that has HDMI inputs is best.  Of course you can make it work lots of different ways, but HDMI is the easiest by a ways.  We got a Proscan 47" LCD 1080p 240Hz HDTV (47LC55S240V87) a year and a half ago and we've been thrilled with it.  The company that makes it appears to have gone out of business, but for getting video from the receiver to a display, it does an excellent job.

Next, you may or may not choose to have an A/V Receiver.  If you intend to listen to surround sound, you'll need one.  We have an aging Harman/Kardon AVR-254.  This provides on of the features that I believe my wife likes best - having as few cables as possible going to the TV.  We can connect our Wii, our VCR and our home theater PC (and several more components if we had them) to it, and run one simple HDMI cable from it to the TV.  It is also capable of decoding the fancy new HD audio that comes on Blu-ray disks.

The next component one needs to consider for this setup is something that can play the ripped disks.  There are lots of different boxes that will do this, but I prefer to stick to what I know: home theater PCs (HTPCs). Right now I'm using a Zotac Zbox (http://www.zotacusa.com/zbox-ad02.html) that I put 8GB of RAM and a 60GB SSD.  It runs Windows 7 Ultimate, which comes with Windows Media Center (WMC).  We rather like the WMC front-end.

Next you need a place to store the ripped DVDs.  Depending on your choice of HTPC, you might just store them there.  You also can use an external hard drive.  We decided to go with a server in our basement.  It's fairly old hardware, but it doesn't take much to store files.

Finally, you need a way to rip the DVDs.  This too can be done on your HTPC if you have an optical drive on it (I don't), but can be done on any PC that has access to where you store your ripped DVDs.  There are several tools out there to do this, and some are even free.  A great free one that I've used is DVDFab DVD/HD Decrypter (http://www.dvdfab.com/hd-decrypter.htm).  Currently I'm doing a trial of AnyDVD HD (http://www.slysoft.com/en/anydvdhd.html).

Having used this setup for quite some time now, I'm pretty happy with it.  The one thing I would change is that I'd put an optical drive in the HTPC.  Every time we rent a move, or borrow one from a friend, we end up having to rip it in order to watch it.

There are additional considerations you need to make if you'd like to rip Blu-rays as well as DVDs.  The space required for a blu-ray (12-50GB) is considerably larger than a DVD (4-8GB), so your storage won't go nearly as far.  Software that rips DVDs doesn't always also rip blu-rays.  Finally, you need additional software on the HTPC in order to play blu-rays.  I use Arcsoft TotalMedia Theatre 5 (http://www.arcsoft.com/totalmedia-theatre/).  If you buy a blu-ray drive, usually it comes with software you can use for this.

This setup comes after about 10 years of messing around, so I know it's what works best for me and my family.  I'm sure every home is different.  The cost of the whole system is significant, but it's stuff we've acquired over years.  Some might find the prospect of a running a file server intimidating.

I'd love to hear in the comments what works for you.

Monday, December 21, 2009

Found a way to fix bing.com

I was frustrated by Microsoft products using bing.com by accident when they thought I might want to search. I came up with a way to resolve this issue:

1. Open notepad.
2. Click File/Open
3. Type in C:\Windows\System32\drivers\etc\hosts and click Open.
4. At the bottom of the file, type the following line:
74.125.19.104 www.bing.com

5. Enjoy! Happy Holidays!

Monday, January 22, 2007

TiVo Replacement, etc. continued

So now that you have read this post, and you have SABnzbd in place, (actually before you use it) you'll need a usenet provider. Most likely, this will not be free (another departure from P2P). However...

Many ISPs provide some type of Usenet access with your account. For instance, I use Comcast, and they give me a 1GB/month account through Giganews, which I access at nntp://newsgroups.comcast.net. You may think a Gig sounds like a lot to download, but consider that a 30 minute show well compressed into XviD is usually around 350MB. That gives you just less than two shows a month to download (my account my be more than that, but it's only marginally more).

The things to consider when choosing a usenet provider are:
  1. Retention: How long after someone posts something to usenet can you retrieve it through this service.
  2. Connection speed: Can you connect to this server at your internet connection's full capacity?
  3. Completion: Once you find what you want to download, will this provider have the whole thing or just parts of it?

There are quite a few different providers out there. I'll discuss only the most popular few.


I use Newshosting and have been quite happy with them for several years. Their website is simple, and my experience with them has been quite good. I would guess that their downtime averages only a few hours a year. Now for the three things I mentioned above:
  1. They have good retention (I get around 75 days with a $14.95/mo account)
  2. I have a 6Mbps connection and I get that speed (sometimes with spikes much higher) consistently.
  3. I have not had any problems with this at all, when posts are less than 60 days old or so.

There are three plans with Newshosting: For $10/month you get what they call NH10: 10GB per month with advertised 70+ day retention. For $14.95/month (NH45) you get unlimited downloads, advertised 45 day retention with a limit of 8 concurrent connections. I have this type of account and I'm pretty sure the 45 day retention limit is only in headers - if you get an NZB file that's older than that, you can still get what it refers to (I've always been able to). Finally, for $19.95/month you get the whole shebang - advertised 70+ day retention, unlimited downloads and unlimited concurrent connections (though I have a hard time imagining how more than 8 connectios would be useful).

Again, I've been thrilled with newshosting and would absolutely recommend them to anyone looking for a usenet provider. To sign up, click here.

Another provider that I've used and liked is Easynews. They might be the most popular provider out there. They have similar statistics to newshosting in the three categories I mentioned, except that their retention is less. From their site: "Retention is one to two weeks in all binary groups, three or more in heavy binary groups." For downloading TV shows, and for people who keep on top of things, this shouldn't be a problem. I remember getting much better retention than that from them. I'm guessing they advertise low retention because they are legally bound to provide at least what they advertise.

One significant difference from Newshosting to Easynews is the type of account you can have. Easynews does not appear to have an unlimited account. In stead, they offer one account type, and that is as follows: $9.95 gets you either 20GB of downloads or 1 month of service, whichever comes first. Then if/when you exceed the 20GB limit, they charge the $9.95 again and your month/download limit starts over. They also explain that NNTP downloads are discounted by 25%. This requires some explanation...

From easynews, you can download directly from their website, over http, or you can connect with a news browser (this is essentially what SABnzbd is). Apparently with a news browser there is a bit of overhead, causing what you've downloaded to be higher than what you've gotten. Thus Easynews gives the discount I mentioned. So If all you use is NNTP through them, you should be able to get 26.66GB downloaded per $9.95.

But wait! There's still more to consider... If you use your computer on the World Computing Grid (a distributed computing program) for at least 15 days/month, you can get 2 free GB of downloads. Also, there is a survey you can take to earn another 2 free GB.

Easynews prides themselves on connection flexibility and privacy. They have many different routes you can use to get to their servers, and they support the NNTPS protocol (secure NNTP) as well as HTTPS. Furthermore, they advertise that they don't log downloads and when you post to usenet (another discussion entirely) they remove any possibly identifying headers. If privacy/anonymity are important to you, Easynews may just be the way to go.

After reading up on them, it is apparent that they have many more features than Newshosting. The main advantage Newshosting has over them is the unlimited download accounts. If you'd like to sign up for Easynews, click here.

The last provider that I'll be discussing here is Giganews. However, it's quite late already, and that post will have to wait for another time.

Saturday, January 20, 2007

TiVo replacement, Usenet automation

I recently helped a friend of mine set up his system at home the way mine is set up for downloading and watching TV shows (some specifics of his were a bit different, but the same stuff applies). This has made my life an incredible amount easier, so I thought I'd share with those that want to know.

Intro: (read if you want to know why I care about SABnzbd)

This brings us to SABnzbd. I'm sure it stands for something. I have no idea what that is. SABnzbd is a wonderful little program that runs in the background on your computer and can watch for what you want, download it, verify it's integrity, extract it and delete all but what you really want. And this is all in the background!

Speaking of background, I need to explain what an NZB file is. As I began looking for more obscure shows (SciFi's Taken comes to mind) I had to start looking in bigger and bigger groups. There is a group called alt.binaries.multimedia that most often contains well over 2,000,000 headers. If you want to find something in that group, you download all 2,000,000+ headers, then look through them for what you want. Well this is a rediculously long process. So someone came up with the idea of NZB files. An NZB file is simply an xml file that contains "pointers" to usenet postings. So if a new episode of The Office gets posted somewhere on usenet, rather than search everywhere for it, I might obtain an NZB file pointing to all I need to get that episode. So that's what an NZB file is. I'll explain later how to get them.

Back to SABnzbd. You might notice the NZB there in the middle of the name. This program only works with these files. You can't download headers with it.

Now, with all that said, it's finally time to set it up. First you'll need to download it from http://sourceforge.net/projects/sabnzbd/. When it's extracted, you'll have a series of folders along with some files. Before running it the first time, open up SABnzbd.ini. It's fairly well documented with comments, so I'd recommend taking a look at all that's there and changing whatever you need to or want to change. Note that in the folder config section it will refer to the current folder as . and use / to specify a subdirectory, rather than \.

Much of what's there can be configured from the web interface, but I prefer having most of it in place before I start the program. Now that that's done, go ahead and double click SABnzbd.exe. Most likely you'll see a DOS box pop up and go away fairly quickly. I thought this was rather strange the first time it happened to me, but it turns out that all the interface is in a local web page. This page can be addressed (if you've left all the defaults in the config file) at http://localhost:8080/sabnzbd.

So that about wraps it up for configuring SABnzbd. I hope to write one or two more blogs this weekend about this. I still need to discuss news servers and nzb file providers. I suppose this is kinda backwards, so I hope you'll forgive me!

Yet another blog...

Any of you that know me know that I also maintain a blog at http://blog.dunninteractive.com. Why, then, am I starting another one?

Well, this my intention with this blog is to write down some of the more nerdy things I've learned, discovered or created. My other blog is more for family and friends to get a glimpse into my every day life.

Some of the things I hope to discuss here include practical applications of vbscript files (yes, the .vbs files that were so famous for being viruses several years ago), automating and using your own online "TiVo" setup, .Net programming, HTML and friends, MS Office and so on.

I would love to see this turn into a place that is very useful to those that are just a bit less nerdy than I am, and to those who are more nerdy, but don't know some stuff that I do.

Here's hoping I'm more faithful in writing this one than I am in writing my other one!

Bob