Saturday, May 10, 2014
Learning F#
I've been curious about F# for quite some time, and I recently decided to pick up a few books on it, and see if I could learn it. More generally, I wanted to learn more about functional programming. I thought about learning something like Haskell or Scala, but F# seemed like a good choice. I already know a good bit about the .NET Framework, and the CLR, so I wouldn't be starting entirely from scratch, and I could stick with tools I already know (Visual Studio).

The three books I picked up are F# for C# Developers, Book of F#, and Programming F# 3.0.I bought them all from as DRM-free e-books from O'Reilly. (This was right before O'Reilly lost the license to sell Microsoft Press books, so the "F# for C#" book would no longer be available from them, if you were looking for it.) I haven't started the "Programming F#" book yet, so I can't say anything about it. But I have read a few chapters from each of the other two books.

"F# for C# Developers" is published by Microsoft Press. It's reasonably well-written, but I haven't really found it to be particularly engaging or interesting. Of the chapters I've read thus far, I'd say that it lives up to its name, in that it is oriented to folks with a good grounding in typical .NET development. I think it would make for a good reference book to keep at my desk, if I was doing some serious F# development at work, and needed to remember the difference between :> and :?>, for instance.

Given that I didn't feel like I was really learning functional programming from that book, I decided to put it down and start reading "Book of F#". For my purposes, this is turning out to be a better book. I've read the first four chapters so far, and I'm finding that I like the tone of it (including Doctor Who references!), and the general style. I'm finding the example code to be a bit more understandable and interesting than in the other book.

I've experimented a bit with re-doing some of the Project Euler problems in F#, as I've mentioned before, and I've found that to be a good exercise too. Oh, and I've solved through to problem 31 there, so I've managed to make some overall progress on Project Euler.

Labels: ,

posted by Unknown 3:55 PM

Spring Cleaning
I received a letter from my landlord this week notifying me that they would be coming through on Monday and spraying for bugs. The letter said that I should clear off my kitchen counters, and move everything out from the cabinets below the counters, and from under the bathroom sink. I only recall them sending out a notice like this once before, maybe seven or eight years ago. As far as I can tell, we don't actually have a pest problem, but maybe there's an issue elsewhere in the building.

Either way, I took this as an opportunity to do some spring cleaning this morning. In addition to throwing out a bunch of random stuff from the kitchen, I also decided to toss out a bunch of old computer books. I threw out maybe 30 or so books. I've done this before, and probably blogged about it, so I'm not sure if I'l be saying anything new here. But I wanted to take a break from cleaning and write up a blog post, so here we are.

I haven't been buying a lot of hard-copy computer books lately, preferring DRM-free e-books instead. At my current job, I have exactly one hard-copy book at my desk. I also have three e-books on my computer that I refer to regularly. At my previous job, I kept maybe a half-dozen hard-copy books on my desk, and a few e-books. At the job before that, I had a whole bookshelf unit, probably six feet tall and three feet wide, full with books (and admittedly a large array of random knick-knacks), most of which I'd bought myself. I left quite a few of them behind when we went out of business, but I took a couple of boxes of them home; most of those went into the recycling dumpster today.

I've been buying most of my e-books from O'Reilly. Generally, I wait for them to have a good sale, as they did last week, on the Day Against DRM. Packt had a really good sale too, any book for $10. I ended up buying three books from Packt. They publish such a wide variety of stuff, I found myself with maybe 15 tabs open while I was shopping, looking at all the cool stuff I'd like to learn about. But I know, at this stage in my life, and with the speed that technology changes, that I'm not going to read 15 programming-related books before at least 12 of them are hopelessly out of date. So I settled on buying just three.

I should make a point of checking back in a year, and seeing how many of them I've actually read. But, hey, if I don't read them, I'm only out $10 each and there's nothing to drag out to the recycling bin!

Labels: ,

posted by Unknown 11:43 AM

Thursday, May 08, 2014
F# on the Mac
I've been messing around with F# lately. It works fine in VS 2013 Express on my Windows 8 laptop, but I wanted to be able to play around with it on my Mac too. I have Xamarin Studio installed on the Mac, and I added the F# support to it, and that works OK. I wanted to be able to use FSI from the terminal too, though. That turns out to be pretty easy too, though it's called "fsharpi" instead of "fsi" like it is on the PC.


posted by Unknown 7:55 PM

base 36 conversion
I haven't posted any code on here in a while, so here's a quick little bit of code that might be useful to somebody. I had to write some code this week to do conversion from base 10 to base 36 and back, in Dynamics AX. So I just took some simple code from the Wikipedia article on base 36 and converted it to X++. Nothing fancy. The code below is all in a job, but I'll probably put it in a utility class when I actually implement it.

Labels: ,

posted by Unknown 6:36 PM

Tuesday, May 06, 2014
Streaming Music Services
In general, I've never been the kind of guy who likes to listen to music at work. And in most of my previous jobs, I really wouldn't have been able to listen to music, since there were a lot of interruptions and interactions that would have prevented me from getting too far into anything before I'd have to take my headphones off to answer a call, or run over to a user's desk, or whatever. But, in my current job, I'm doing a fair amount of "heads down" programming, with few interruptions. And I'm actually finding that some of the office noise distracts me enough that drowning it out with music allows me to be more productive.

For a while, I tried just listening to Coffeetivity. This was kind of helpful, but also kind of boring. I may give it another try at some point. I also tried focus@will. The idea here is kind of cool, but I'm not convinced it would make me more productive than listening to music of my own choosing. Again, I may give it another try at some point, maybe the next time they run a 50% off sale on a year's subscription to their "premium" service. And, as I've mentioned previously on this blog, I was really in love with Unfortunately, they shut down a while ago.

After messing around with all this stuff, I settled into a habit of listening to Pandora a lot. I set up some "stations" based on my favorite artists, and that worked out pretty well. About a year ago, I paid $36 to subscribe to Pandora One for a year, so I could get rid of the ads. That didn't seem like a bad price, even though it really doesn't buy you anything other than ad-free listening.

This past weekend, I got a notice that it was time to renew. (Normally, that would have happened automatically, but my credit card got stolen a while back and I had to replace it, so they couldn't put through the charge on my old card.) I really wanted to just renew it for another whole year, but Pandora discontinued the annual plan a while back. So the $36/year (effectively $3/month) plan would become a $4/month plan with no annual billing option. I wasn't sure if I wanted to go forward with that, so I basically just let the subscription lapse. Then, on Monday, when I looked again, I realized that I was no longer eligible for the $4/month "loyalty price," and would have to go on the new $5/month plan. So I decided that was a but much, and I'd look around at other options.

For now, I've settled on Slacker. The ad-free version is $4/month, and it gets you a few things that you don't get with Pandora. The one feature I really like, and I wish Pandora allowed, is the option to download stuff for offline listening. I can't use my employer's wifi to stream music to my phone at work, so I have to rely on my Verizon data connection. This generally works OK, but I can wind up getting pretty close to my data cap sometimes, and I think it drains the battery a lot more than listening from a local cache. So just being able to download a cache of stuff over my home wifi, before leaving for work, is useful.

I'm also finding that Slacker's "curated" stations are interesting. I listened to "The Current" station today, and it was really good. I'm not sure how often the content on that station is refreshed, but I could see myself listening to that one quite a lot. So, overall, I'm finding Slacker to be just as good as Pandora, but with a few more bells and whistles. Over time, I'll see how well it holds up -- whether or not there are any glitches with the app, how often content is refreshed, and stuff like that. But I'm feeling pretty good about it.

Labels: ,

posted by Unknown 8:50 PM

Sunday, May 04, 2014
a little more on digital comics
As a follow-up to my post earlier today, I spent some time today looking through my e-mail receipts for Comixology and Dark Horse Digital purchases, and made lists in Evernote for stuff I've read and stuff I haven't read yet. First, let me say that I was surprised to see how much stuff I've bought, in both apps, but haven't actually read yet. But now that I have decent lists to start from, I should be able to keep track of it all, going forward.

Labels: ,

posted by Unknown 2:14 PM

Thoughts on digital comics
OK, this is going to be my obligatory post on Amazon's purchase of Comixology, and possibly some related topics, depending on whether or not I run out of steam before I get to all the stuff that's in my head right now. :-)

First, let me say that I have hundreds of books in my Comixology library. I can't tell you how many, because Comixology's web interface for browsing your library really doesn't tell you much. (OK, picking up my iPad and looking at the app, I can see that it's apparently 635. But there's no way to see that on the web, as far as I can tell.) This is the main beef I have with Comixology, both with their web interface and their apps. Since their books are DRM'd, I can only store them and read them in the Comixology apps (and site), and they really haven't put much work into making any of their interfaces really useful for people with more than a handful of books. Even something as simple as keeping track of read vs unread status across devices would be nice. They have said that they're "working on it" and "we need to do this", but they really haven't done it. The iPad app will mark as "new" stuff that you've just downloaded and haven't read yet. But that's only tracked in the app itself. The "cloud" view doesn't track when or if you've read something. And since they just replaced their apps with new versions, all that info from the old app is effectively gone now.

I've recently started using Goodreads to keep track of my reading for dead-tree and Kindle books, and I'm thinking that maybe I should use it for Comixology too. Though single-issue comics don't fit well into Goodread's model, really. Maybe I should just track them in Evernote? The thing that really clutters up Comixology is all the free comics. Not that I'm complaining about all the free comics I've downloaded from Comixology, but it can make it hard to find the stuff I've actually paid for. Even just having a simple user-contolled tagging system or folder system would solve this problem. How hard would that be to implement? 

Moving on to the subject of Amazon's purchase of Comixology, this could be good or bad. Removing the in-app purchasing option wasn't a big surprise. You can't do in-app purchase in the Kindle iPad app either. I want to say that Amazon's purchase might let them spend more money on both the web and app interfaces, and maybe implement some of the stuff I'd like to see there, but then I remember what the interface looks like in the Kindle app, and on the Kindle itself, and I laugh at the idea that Amazon might implement nested folders or useful tagging in the Comixology app. (Not that I'm bitter or anything..)

Meanwhile, I just recently bought Comic Zeal for my iPad, so I can have a nice interface for managing and reading my DRM-free comics. Previously, I'd used Goodreader to read some comics I had in PDF format. Goodreader is a pretty great piece of software, and it works OK for comics, but it's not perfect for them. So I looked around at comics readers, and Comic Zeal seemed to have the best reviews. I've loaded a bunch of stuff into it, including comics I've bought from Matt Howarth and some stuff from Drive-Thru Comics. I really like the ability to organize stuff. It's quite easy to put stuff in folders by series, to tag books, and to reorder the list of books. The software does keep track of your reading progress in individual books, but I haven't found any option to, for instance, show only unread books. But really, since I'm only using it for DRM-free books, I can just delete stuff that I've already read, and just keep that stuff on my PC. In terms of the actual reading experience, I've found it to be a bit slow on page-turning for some PDF comics. I really haven't used it enough to have formed much of an overall opinion yet though.

I'm thinking about picking up the Image Comics bundle that Humble has on sale right now, so that would give me a bunch of new stuff to load into Comic Zeal and enjoy. If I do that, and actually get around to reading some of it, then I'll probably post a follow-up with more thoughts on how well Comic Zeal works in practice.

Labels: ,

posted by Unknown 11:24 AM

Sunday, April 06, 2014
more Project Euler stuff
This weekend's main entertainment has been working on Project Euler problems. I've been trying to learn F#, so I decided to go back and re-do the first several Euler problems in F#. That exercise definitely helped me start to get a handle on doing things "the F# way". I still have a long way to go, in terms of functional programming, but I'm learning.
I also solved problem 27, which was the next one up for me, in C#, as usual. Just because I wanted to make some progress, overall. This is only the second Euler problem I've solved this year, but I'm starting to get the "bug" again, so maybe I'll knock a few more out this month.


posted by Unknown 11:00 PM

Friday, April 04, 2014
new Bob Mould
Cool, a new Bob Mould song!


posted by Unknown 7:13 PM

Saturday, March 22, 2014
After my issue with podcasts that I posted about last week, I decided to switch from using iTunes and the Apple podcast app to Instacast. I bought both the Mac and iOS versions. After using both for about a week, I'm mostly satisfied, but there are definitely a few shortcomings.

First, on the plus side, Instacast hasn't arbitrarily deleted a bunch of podcasts from my Mac, as iTunes did last week. Instacast has a pretty interesting way of dealing with podcast files, actually. It's not quite perfect for the way I'd like to do it, but it's reasonable. Basically, you set a maximum amount of space that you'd like to use for podcasts, and Instacast deletes stuff once it reaches that limit. It's pretty sensible about picking what to delete -- it goes for episodes that you've already played and haven't marked as favorites first, if I understand it correctly. I've set it to use up to 10 GB on my Mac, and 1 GB on my iPhone, so that should be good enough. I kind of wish, though, that you could set certain podcasts to keep forever. There are a few podcasts, like Warren Ellis' SPEKTRMODULE, for instance, that I'd like to just keep forever. With Instacast, I can't really do that, and I guess I'd want to copy the files out of Instacast and into a separate folder.

Which brings up a separate point: Instacast does allow you to right-click on a given podcast episode and select "Show in Finder", so that's good. But, unlike iTunes, it doesn't organize individual podcasts into their own folders, now does it keep the original file names. Instead, it puts all of its files together in a single folder, and names them with (I assume) random GUIDs. So, to copy out all of the episodes of a given podcast, I'd really have to do "show in finder" on each one individually, and copy them one at a time. (And if I wanted the copied files to have reasonable names, I'd have to rename them too.) So I'm not too happy about that, but it's not a terribly big deal.

In terms of the actual functionality of the apps, let's start with the Mac app. It seems to be a reasonably well-written Mac app, not taking up too much memory or CPU, and launching pretty quickly. (I wish that was something I could take for granted with a commercial Mac app, but alas, no...) I'm using the Mac app mostly to watch Tekzilla. (If there were any other video podcasts that I was interested in, I'd use it for those too, but there isn't anything else I'm following right now.) It does a good enough job on that. Basically, it just plays the video and gets out of the way, which is what I want. It works fine for playing downloaded episodes, and it can also stream episodes that you haven't downloaded, which is nice.

For the iOS app, that also works reasonably well. I use it only for audio podcasts, and I follow a few of those. You can set it to download episodes only when on wifi, which is a good thing, as my Verizon data usage has been a problem lately. I've had it randomly stop playing a podcast twice so far, which is a bit puzzling. In both cases, I could start the podcast back up where I left off, no problem. I was driving both times, so I didn't see what happened. I'm not sure if the app crashed or if it just stopped playing. And I think it was the same podcast file both times, so maybe there was just something wrong with that file. If this keeps happening, I'm going to get frustrated with it pretty quickly, but we'll see what happens over time.

There's a function built into both the Mac and iOS apps called "Up Next" that lets you create an on-the-fly playlist of a few random podcast episodes, so you can set yourself up if you've got a long drive. I used it today for my 90-minute drive down to a friend's house, and it worked well. There doesn't seem to be a way, though, to tell it to just continuously play consecutive episodes of a single podcast, which is a bit weird.

There are a few other things I could mention, but this post is long enough as-is, so I'll leave it there, and just say that I don't regret spending the $20 on the Mac app and $4 on the iOS app, but I'm still not sure if I'll stick with it or switch to something else in the long term.

Labels: ,

posted by Unknown 7:17 PM

iBooks on the Mac
I have a few things I want to write up and post today, and, taken together, I think they're going to make me look like a cranky old man. But that's ok.

I bought a couple of Microsoft Press ebooks from O'Reilly today, since they're having a "Farewell MS Press" 60% off sale right now, so I thought I'd snag a couple while they were cheap and still DRM-free. It looks like MS Press is moving to Pearson for distribution, starting April 1. It's unclear as to whether or not they'll continue to offer DRM-free ebooks, but (being a pessimistic and cranky old man), I'm guessing no.

So, after downloading them, I wanted to drag them into iTunes so I could read them on my iPad with iBooks. (That's a lot of iProducts, huh?) Well, I hadn't done that in a while, so, for some reason, I launched iBooks on my Mac. I don't think I'd ever actually done that before, as I don't really read books on the MacBook. It prompted me to import my books from iTunes, so I went ahead and did that. Now I'm cranky.

Having a dedicated app to read books on the Mac seems like a good idea. There's no particularly good reason books should be kept in iTunes. But, after going through that import process, I'm not entirely happy with the result. iTunes kept books in a nicely-organized folder, with sub-folders by author name, and files named (sensibly) according to the book title. And (of course) if you pulled in a book with bad metadata, you could press Command-I on it in iTunes and edit the metadata.

iBooks, on the other hand, stores all the books in one folder, no sub-folders, with names that appear to be randomly-assigned GUIDs. And there's no right-clck "View in Finder" option in iBooks, so there's really no telling which one is which. And there's no way to edit metadata in iBooks, so if you import a book with bad metadata, it's quite a task to change it. (There's some more help with that here.) Or I could switch back to iTunes, but that's pretty darn complicated.

I'm starting to wonder if I should switch to a third-party reader app (much as I did with podcasts last week) and give up on iTunes. Almost all of the ebooks I want access to on my iPad are DRM-free ones from O'Reilly and Packt. I already have a few apps on my iPad that might do the trick, including GoodReader, the Kindle app, and OverDrive. Maybe I need to pick one that works well with DRM-free epubs or mobi files, and stick with it.

Labels: , ,

posted by Unknown 11:36 AM

Google+ surprise
So I got a little surprise today when I got a notification on my phone that someone had commented on my Google+ post. Now, I haven't even *looked* at Google+ in months, so I wasn't sure what had happened there. It turns out that Google has been helpfully sending all these blog posts to Google+. I'm sure I must have clicked "OK" on a dialog that popped up on the Blogger site at some point to allow that, but I'll be darned if I can remember doing so.

It doesn't really bother me that this is happening, but it's one more little thing that makes me revisit the idea of moving this blog to Drupal or WordPress, hosted on my 1&1 account, and administered entirely by me. I have quite a few posts on this blog, so I would of course want to import them to any new blog, and there's the rub. Some time ago, I tried to import everything to a new Drupal site, using this importer. To make a long story short, it didn't work. (That may not have been entirely the fault of the importer; it might have been something with my local MySQL and/or PHP setup.) But now I'm thinking, more and more, that I don't want to trust Google too much. With the direction they've been going in lately, I could see them, at some point, trying to fold Blogger into Google+, and I *really* don't want that!

Labels: ,

posted by Unknown 11:05 AM

This page is powered by Blogger. Isn't yours?
© 2011 Andrew Huey