March 6, 2016

Compiling aacgain (an exercise in Open Source software archaelogy)

Filed under: Software Blog — marcstober @ 12:07 pm

So I found a lecture that had been recorded and posted online that I wanted to listen to.

The only problem, is, it was very, very, quiet. I had to turn up the volume all the way to hear it all all, and still could barely hear it; not to mention that I almost damaged my ears when I changed to listen to something else.

So, being me, I went looking for an open-source tool that could modify the volume of an audio recording. I found some references to mp3gain, but this was an M4A file which is (basically) an AAC file. It also turns out there is something called aacgain. But what I was finding was source code, which I don’t usually bother with.

Nevertheless, I downloaded and tried to compile it. I was able to compile mp3gain easily, so I was encouraged. aacgain, which I really needed, was more complicated. But, I dug in, and after downloading various things from SourceForge and Google Code, and combining that with an existing copy of the core mp3gain code to Github, I was able to get aacgain up and running.

I say this is an exercise in software archaeology because this useful software was written several years ago and hosted on sites that are no longer the go-to places for open source code. There was a bit of fiddling required to get them running on a modern system. In the end, though, this is one of the promises of Open Source; you’re free to find something useful that no one is actively maintaining and get it working again yourself. It’s not just about the cool new stuff–something old and unmaintained, if Open Source, can still be valuable.

I’ve placed all the source code I cobbled together back in a Github repository for the benefit of anyone else who can use it.

Now off to listen to that lecture!

January 7, 2016

grunt.file.match and grunt.file.isMatch Do Not Access File System

Filed under: JavaScript, Software Blog — marcstober @ 10:05 am

While trying to improve my team’s grunt scripts, I spent a while stuck trying to figure out why grunt.file.isMatch wasn’t working.

I was expecting this to be like a fancy “file exists” check, that would take some pattern and looking in the current directory and subdirectories (as specified by my globbing pattern) to tell me if the file exists. And I couldn’t figure it out, especially since there were two arguments, “patterns” and “filepaths”.

Ultimately, I looked at the source code and figured out I’d gotten in all wrong. Despite being methods of the file object, “match” and “isMatch” don’t look at anything in the file system. They’re just string pattern matching operations: completely deterministic functions that match “patterns” against”filepaths”.

What I’d really wanted to do was something like:

if (grunt.file.expand(“my-dir/**/*.js”).length > 0) { …

Posting this so hopefully the next person searching the web for a solution to the same problem finds this and doesn’t get stuck like I did!

July 13, 2015

Renovation Update

Filed under: House Blog — marcstober @ 7:27 am


We’ve just finished week 12 in our home renovation project.

People always ask how long it’s going to take. It’s a way to make conversation but it’s not what I want to talk about. It’s like kids asking “are we there yet?” on a car ride instead of think about the fun things you’re going to do on the vacation. We’ve been planning this since we bought the house nine years ago and hope to live here for at least as long again, so I’m not focused on the temporary disruption.

Maybe what people really want to ask is how much it costs. Let’s get that out of the way: We crossed the six-figure mark a few weeks ago, about halfway through the project. I’ll leave it at that.

The Process

We hired an architect, Peter Sachs, to design the project, and a builder who he recommended. You can renovate a single-family home without an architect, but it was a good investment. Thanks to his advice, we’ve avoided some mistakes and done things that will add to the home (and it’s value if we sell it) more than raw square feet. Some people hire design-build firms–one company that handles the architectural design and construction–so they won’t design something you can’t afford. I wanted to design what we needed first and then figure out how to afford it.

We’re paying our contractor on a time-and-materials basis. This goes against the conventional wisdom, Theory X, win-lose viewpoint I’ve encountered, where you’re supposed to have a contract and then get argumentative about sticking to it. Maybe I’m idealistic, but that doesn’t seem fair and or even realistic. Maybe some people just like the intellectual challenge of contract law more than the craftsmanship of their house. I’d rather trust the people working for me. Time-and-materials carries risk, but only in the economic sense that greater risk leads to greater reward. Since I’m not buying “insurance” against a change in plan, I save money if the contractor does. If things cost more, it is what it is, nobody “loses.”

And one of things we’ve gotten from our contractor is a lot of value engineering, saving us money by following the architect’s plan on the whole while finding more cost-effective solutions in specific areas. For example, using an in-wall toilet that takes up less space to avoid moving the entire wall, or buying a different name-brand window that he was able to get at a better price.

Our architect has been less involved in the construction phase of the project. From what I’ve heard, some architects choose paint colors and lighting fixtures and every detail, and while I’m sure ours would have us good advice in these areas if we needed it, he’s let us work these things out with the builder and other vendors, which is fine because I like picking out these details.

The Decisions

The first parts of the project were major but not needing a lot of decisions. I mean, having a giant excavator and cement mixer visit your house is pretty impressive. But, it’s a hole in ground filled with concrete, I’m not ruminating on the details. Now we’re into things where getting the details right now really matter: exactly where a door or outlet is going to is something that we need to get right now or we’ll be living with the repercussions for years to come. I’m telling myself, “you can do it this way, or that way”–sometimes, I need to let go of the idea that there is one right answer and I’m going to get it wrong.

I tend to obsess about the electrical stuff. I like a lot of light, but I’ve never liked the heat incandescent light generates, and I like bluish fluorescent light when I have to stay alert after dark and traditional warm yellows when I need to relax. Fortunately LED’s have made amazing progress in the past 10 years; they were too unusual and expensive when building the kitchen just 8 years ago but it’s easier to find LED’s now than the halogen bulbs we used then. Maybe I should have obsessed about windows more instead, but in all these years of thinking about lighting I’ve never given much thought to windows other than whether they’re double-pane or drafty. I’ve been researching online about home automation. It’s seems to in the same expensive-novelty-but-might-have-potential phase LED lights were 8 years ago. I want to try and experiment with it, but not until after the “real” construction.

On the other hand, a big part of this project is being able to delegate these decisions to your architect and builder. I think that comes naturally to some people–they have “a guy” they trust and don’t even want to think about the details. But not to me; professionally, I’m a “leaf node” about the details: business people and UX designers give me a concept and I’m the one who actually puts every bit and pixel in place and chooses the specific code. And on smaller home project, I’m a DIYer and enjoy working out the details myself, too. But on this project I’m the owner at a high level, and not the one who places every stud and screw, so it’s just the opposite of the role I play at work.


The Big Build

I’ve called this project the Big Build, because it’s for our family what the Big Dig was to Boston: it changes everything. (We were in Boston last night and events were going on on the Greenway and in the Seaport area–it really has changed things!) When we first moved into the house, we talked to a couple architects, both of whom gave us advice to do a larger project that we couldn’t then afford rather than improving the house piecemeal. We renovated the kitchen, but deferred almost all other major improvement and maintenance. People seem surprised how big the project is. It’s not that big in an absolute, McMansion sense; we’ll end up with around 2,000 square feet, maybe a little under. But our project is changing every room in and side of the house to some degree; even the rooms that aren’t changing much physically will be used differently.

While there are mornings I don’t relish contractors showing up at 7:00 a.m. I’m thankful that the dream I’ve had since childhood of a custom house is coming true!

May 10, 2015

Boston Public Library Inscription about Education and Liberty

Filed under: Uncategorized — marcstober @ 5:22 pm

Did I mention I like libraries? And architecture? So of course I love the historic Boston Public Library building in in Copley Square. I was there yesterday, and remembered that I few years ago I took a picture of the inscription on the building, facing Boylston Street, that pretty much sums up my viewpoint on politics and life in general:

The Commonwealth Requires the Education of the People as the Safeguard of Order and Liberty

(Because, you know, Massachusetts is technically a “commonwealth.”)

Actually there’s more to the story: I took the pictures on my way to the 2013 Massachusetts Pirate Party convention, which, despite the silly name is raising some important issues along the same lines. I’m still registered as Democrat though so I can cast a meaningful vote in primaries, like maybe for Bernie Sanders.

So I played around with the pictures in Pixelmator today, made the meme-friendly version above, and new masthead background for my blog (further above), and I’m sharing them on flickr. Under a CC free-culture license, appropriately.

June 15, 2014

My Real Claim to Fame

Filed under: Personal Blog, Software Blog — marcstober @ 10:35 am

In 2009, I answered a CSS question on StackOverflow about word-wrap in an HTML table.


5 years later, almost every time I go to the site, I am greeted with new reputation points from people upvoting my my answer. I now have a reputation of 3,602 which the site tells me is in the top 10% overall! My answer, which is the top answer to the question, has been benevolently edited and commented upon and the question protected due to its popularity.

I got lucky. If I had this problem I wouldn’t know the answer today and would go looking for the answer on StackOverflow. Even if someone asked the question today and I did know the answer, someone else would probably answer it before me. I just happened up on an unanswered question to which I’d just happened to figure out the answer in some other work I was doing.

The significance of this is that figuring out these little technical details of user interface implementations really is how I make my living, and it’s also how I leave the Web a little bit of a better place than I found it. As my tagline says, repairing the world, one byte at a time.

(For those who aren’t familiar, StackOverflow is a hugely influential online question and answer forum for computer programming questions. I like to say, only half jokingly, that my job as a software developer isn’t really about knowing how to do anything but about knowing how to find the right answer on StackOverflow.)

June 1, 2014

Who’s Social Now?

Filed under: Business, Consumer, Jewish Organizations, Parenting, Social Media — marcstober @ 2:41 pm

So this was an interesting tweet:

There are times when I wish the religious organizations I’ve been involved with would take some marketing lessons from the retail world. But, sometimes, we should value what we’re doing better: community and social stuff. I mean, the Jewish world is in the business of giving people a way to find community and social on Friday night as we have been for thousands for years. Businesses trying to add community and social features to their website are WAY behind at what community really means.

Indeed, I came across this tweet because I was ordering labels for kids going to summer camp. I am going to let the nonprofit Jewish summer camp meet some our family’s needs for community and social. Try as they might, the e-commerce company trying to be social seems a little forced. But they probably make good labels.

January 20, 2014

When Instagram is the (small) Sanctuary

Filed under: Judaism, Parenting — marcstober @ 10:07 am

It was just Tu B’Shvat. I really had good intentions to do something for Tu B’Shvat this year. We could have done a little seder with the dried fruit, or maybe even found something to go to in the community. I mean, we had just gotten back from a family trip to Israel and were supposed to be feeling all connected the land and all.

And then, after kids went to bed, I was looking at Twitter. And seeing tweets about the holiday from my more religious or environmental-activist “friends.” Tu B’Shvat was tonight?We had pasta and broccoli, nary a tree food in sight. (And we’re not even one of the those families that gets the kids to eat the broccoli by calling it “little trees.” Though I did put some olive oil on it….)

The next morning I was still fretting when I realized, what is the tree fruit that I consume even more religiously than I observe my actual religion? That is probably the most consumed tree food in the world? That you you have to brew first? Yes, coffee! I was certainly planning to start my day with coffee. It turned out I had Max with me when I stopped at Starbucks, and he wanted hot chocolate. Cocoa beans grow on trees too, right? The second most important tree food! So we stopped at Starbucks, and I Instagrammed and tweeted this picture.

To the casual observer, I was all that is wrong with parents today: ignoring my kid to look at my phone while plying him with sugar on weekday morning. But for me, I was making the experience sacred, holy, special, kadosh. I took a common stop at a chain restaurant and elevated it. By taking that picture and posting those words, it didn’t matter where I was. I was celebrating Tu B’Shvat, and doing it with my community: my virtual Jewish community of people, some of whom I don’t often get to see in real life, but who, through social media, let me be part of a Jewish community wherever I go. Of course, finding real-life community is great, but to those who say I would be better off if I put down my phone: I seriously doubt I was going to connect with another Jew about Tu B’Shvat that morning otherwise.

Judaism gives us the idea of mikdash me’at—the small sanctuary. The idea is that we can make things holy wherever we are, in our homes and communities. It’s a beautiful idea that I love about Judaism and that’s helped us survive as a people. This year, we sanctified Tu B’Shvat with Instagram at Starbucks. I still pray “next year in Jerusalem”–but more likely, next year will be on Pinterest.

November 26, 2013

Feeling Inadequate About Feeling Inadequate (as a man)

Filed under: Gender, Media, Personal Blog — marcstober @ 8:02 am

I’m always hearing it’s a problem how media portrayals of women set unrealistic expectations: how they should look, how they should eat, how they should work, how they should be as girlfriends and wives and mothers. Maybe it’s a more of an issue for women than men, but men have the same issue–at least this man does. It’s insidious because the messages are usually subtle. But sometimes they are so ridiculous they just make you laugh, and remind you that you shouldn’t be paying so much attention to what other people think at all.

Like the profile of Bryan Goldberg in the New Yorker with this picture of him surrounded by women, one of whom he’s using as a desk:


I feel inadequate as a man because because I’m not Goldberg. Driven by money and sports. Doesn’t read books, but is president of his own company. Says he doesn’t care about beauty, but gets all the beautiful women. I bet he eats steak and drinks whiskey.

Ironically, 50 years ago, mid-century modern decor was considered progressive, while the media’s portrayal of a successful male would have been old-fashioned nobility, complete with smoking jackets, and certainly not in Brooklyn. Then, the way you would degrade a woman was by making her do your typing. In today’s image, the possibly Ivy-League-educated woman is positioned so she can’t use her hands while the alpha male does his own typing; he can communicate with the outside world via WiFi but she has to remain focused on him.

The hard part is, while I feel inadequate because I’m not Goldberg, I also feel inadequate because I’m not the perfect liberal above the temptation either. I like shiny new MacBooks. And I’m still a cismale who’s attracted to 25-year-olds in short skirts and high heels (or boots…). And, while it’s not my thing, I know perfectly decent guys who actually do like football, or the stock market, or beer and steak. I could just be thankful that I have the freedom to sit at a Starbucks drinking good coffee, blogging on my MacBook, watching all the attractive people go by, plus I have a great wife and kids that love me. I mean, most men should be so lucky. (Well, except that you can’t really find a seat at Starbucks, they just give the illusion of a third place to attract customers and make their money in take out. But that’s another topic…)

But, no, the media has to remind us that a real man would get a woman use her bare legs as a desk for his laptop. (Which, as I sit with my Macbook in my own lap to write this, I realize would get hot enough to seriously burn her.)

Of course, really, the photographer probably posed them this way. I’d like to think he had all of this mind.

Thanks to “Blogging Like A Mother” by Kara Van Cleaf (who’s a graduate student at CUNY; I have a graduate degree from CUNY!) via @sarahkendzior (who’s from St. Louis, where I also went to school!). Photograph by Pari Dukovic; while I do not have his permission to use it here I believe it is legal according to the principle of fair use.

September 12, 2013

One of these EMRs is not like the others

Filed under: Health, Software Blog, Usability — marcstober @ 10:58 pm

winner-thumb healthhub-thumb runner-up-thumb

Above are three thumbnail screenshots of prototype medical applications.

One of them is the winner of a White House competition, winning thousands of dollars and influencing the EMR of the huge VA medical system.

One is a problem-oriented medical record and the runner up.

One is a prototype I designed as part of an Innovation Team project while working at Partners. (We didn’t win a White House award. I guess we were ahead of our time.)

June 28, 2013

Announcing the Release of My First Firefox Extension: More Bookmarks Toolbar

Filed under: Software Blog — marcstober @ 2:53 pm

Announcing the release of my first Firefox Extension: More Bookmarks Toolbar.

Add a second bookmarks toolbar to Firefox, with a separate set of bookmarks.

For example, use it at work for a separate set of bookmarks that only work on the corporate intranet. You can still use the regular bookmarks toolbar for personal sites, and hide and show either or both. (And with Firefox Sync, keep them consistent across my home and work computers.)

See its page or download from

The source code is on Github.

Next Page »