hudebnik: (devil duck)
A week or two ago, my employer hosted one of the stops on Marie Kondo's book tour promoting her book the life-changing magic of tidying up. Ms. Kondo was apparently the sort of girl who cleaned not only her own room but her siblings' and the rest of the house, much to the annoyance of the rest of her family, but she's turned it into a profession: she's a home-tidying-and-organization consultant in her native Japan.

Naturally, the difficulty of tidying and organizing your home is a supralinear function of how much stuff you have, so the majority of the book is a collection of psychological tricks to enable yourself to get rid of stuff. I haven't tried much of this yet, but they look very sensible and practical (even the sorta mystical ones like "thanking an object for its good service before sending it on its way"). Some of the more prominent ones:

Major decluttering is a special event, not an everyday habit

Yes, you need to keep things tidy day by day. But getting rid of large amounts of stuff needs to be done in a concentrated block of time; don't try to get rid of a thing per day.

Work by categories, not locations

Don't say "I'm going to declutter Room X," but rather "I'm going to collect all the objects of Category X in the whole house, put them in one place, and decide which ones to keep." This way if you turn out to have essentially the same object stored in several different places, you'll find out about it and can eliminate duplicates. Of course, if "all the books" or "all the clothes" is a dauntingly huge category, you can pick small enough subcategories to fit the block of time you have.

Take everything of the chosen category out of wherever it is, put it on the floor in a big pile, pick up each individual item, touch it, and look for a visceral response: "does it spark joy?"

Putting everything on the floor serves two purposes: it shows you graphically how much stuff you have in this category, and it forces you to actively choose to keep each individual object, rather than passively leaving them where they were. The question "does it spark joy?" aims towards the goal of a home in which everything around you makes you happy. If it doesn't make you happy, and isn't necessary to life, it's not pulling its weight and doesn't need a place in your home.

Start with emotionally-easy categories, to develop discriminatory skill, and work up to the harder categories.

She recommends the order "clothes, books, documents, miscellaneous items, mementoes," although I'm sure different people have different degrees of attachment to these categories. The point is to get practice making the "does it spark joy?" decision on the easy cases, and have an experience of success getting rid of things that don't, before moving on to the emotionally wrenching ones.

Talk to your things

Your things don't enjoy sitting on the shelf (or in the bottom of a box) unused. When a book has taught you all it's going to teach you (including, possibly, the fact that you don't like the subject or the author), thank it for its good service and send it off to teach someone else. When an article of clothing has become, at long last, unwearable, thank it for its years of service and send it into a well-deserved retirement. And so on.



I had a Sunday with few commitments, so I decided to dip a toe in the water today. I picked two small categories -- computer accessories and old electrical appliances -- and threw three keyboards, two mice, about twenty cables of various descriptions (generally keeping one representative of each equivalence class, e.g. USB-A-to-USB-mini-b, VGA-to-DVI), a toaster, a food processor, a DSL modem, and a wireless router into the recycling bin. There are still a lot of computer CDs that I'll realistically never use, but I haven't looked at them yet. There are at least two computers in the basement, but I think I can wait to take them somewhere that actually recycles computers. It's a tiny step, but I have a feeling of accomplishment.
hudebnik: (teacher-mode)
Joe Schmoe does a Google search on his own name and finds something embarrassing that he did, said, or posted ninety-leven years ago. He requests that Google (insert your favorite search engine here; the case applies to all of them) remove that document from its search results on the basis of his "right to be forgotten". Google is initially reluctant, on grounds that the document is authentic history, and Google doesn't want to rewrite or censor history. Joe Schmoe takes it to court, and in an environment of strongly anti-Google public opinion, wins. The EU court recognizes a "right to be forgotten" (sort of -- see the report for the nuances), but also recognizes the public's legitimate interest in uncensored history, particularly if Joe Schmoe happens to be a public figure, and the publisher's right to free expression. Google is given a few months to develop procedures (administrative, legal, and technical) to respond to such requests, which have since numbered in the tens or hundreds of thousands.

Anyway, Google convened a panel of outside experts to advise it on how to handle the "right to be forgotten". Its public report has just been released. I've just started reading it, but it should be a good read for anybody interested in online privacy and censorship issues.

tech woes

Jan. 10th, 2015 08:17 am
hudebnik: (devil duck)
For a number of years, our stereo has had a flaky left channel (or maybe it's the right -- anyway, one channel comes in and out at random). I've swapped speakers and connections and confirmed that the problem is inside the receiver box, and applies to both front and back on that side. So we finally bit the bullet and bought a new $xxx stereo receiver. High-end: a Marantz, with wi-fi and lots of bells and whistles. Indeed, so many bells and whistles that it comes with a "Setup Assistant" program to help you customize it to its new environment. The "Setup Assistant" displays on your TV, through the HDMI connection. Unfortunately, our TV is sufficiently old that it doesn't have an HDMI connection, and although the owner's manual shows you how to connect a non-HDMI TV for ordinary viewing, the non-HDMI connection apparently doesn't work for the "Setup Assistant". Marantz tech support confirms this: "you can use the receiver with a non-HDMI TV, but you can't set it up without an HDMI TV." Why would they go to the trouble of building in non-HDMI connections, but make an essential part of the functionality unable to use them?

So we're now facing a choice:
(a) we could return the receiver because our TV is too old to use the receiver even for radio listening, and go on with the flaky left channel;
(b) we could return the receiver and try to find another one that's easier to set up (although this Marantz was one of very few models we saw that would fit in the 5"-high shelf of the entertainment armoire);
(c) we could try to borrow an HDMI monitor for long enough to set up the receiver (and again any time we need to make a non-trivial change to the setup, e.g. when we change the password on the home wi-fi network);
(d) we could spend another $yyy on a new TV so we can listen to the radio. (We'd also presumably get a better TV picture, but we don't spend that much time watching the TV.)

First-world problems, I know. We could be starving refugees from a war-torn or disease-ridden nation, we could have just lost a friend or relative to murderous religious terrorists, etc. etc.

Heartbleed

Apr. 14th, 2014 08:48 am
hudebnik: (teacher-mode)
Thanks to [livejournal.com profile] jducoeur, this link to XKCD's explanation of the Heartbleed bug.

OMG: I didn't realize it was this simple and stupid. Reason #738 why no production code should be written in C or C++.
hudebnik: (Default)
Java's constructors have annoyed me for years. They're called and defined with a different syntax from any other method, and they can't be inherited. If objects of a bunch of classes are each supposed to be able to create duplicates or near-duplicates of themselves, each such method has to be written separately, no matter how similar they are, because they all call different constructors. And Java constructors always produce a new instance of the specified class -- they can't return an existing instance, they can't return an instance of a subclass of this one, and they certainly can't return an instance of another class that implements the same interface. All of which means they're heavily tied to implementation, and should not be exposed in an API.

One can get around some of this by using pseudo-constructors, aka factory methods. If the whole purpose of a factory method is to return a (possibly) new object, one must be able to call the method without already having an object of the class, so it has to be static. Unfortunately, static methods can't be abstract, so they can't be specified in an interface; if a dozen classes all have static methods with the exact same signature, you still have to specify them all separately.
hudebnik: (rant)
Thanks to [livejournal.com profile] osewalrus, Eben Moglen's keynote address at Freedom To Connect 2012:



The whole video is about an hour and a half -- an hour of prepared talk and half an hour of Q&A -- but to whet your appetite, here are some excerpts:

excerpts )
hudebnik: (teacher-mode)
The students in my Principles of Programming Languages course have been kvetching because I asked them to do their interpreter project in Scheme. They only learned Scheme last semester, and they already know it's not a "real" language, so it's outrageous and arbitrary of me to ask them to write something substantial in it. I had pointed out that it makes parts of the assignment easier, and they replied (reasonably enough) "but if it takes more work to learn the language, we haven't really saved anything."

So yesterday in class I said "OK, I give in. This course isn't about Scheme, it's about interpreters and language features, so you're welcome to do this assignment in whatever language you like. Would you like to do it in Java?" Massive acclaim. "Let's work through Version 1 of the assignment [which they had all already done in Scheme] together in Java; once we've got that working, you can do all the subsequent versions on your own." I opened Version 1 in Scheme for reference, and started translating at the board.

The first datatype definition wasn't too hard. The 6 lines of Scheme code became 70 lines of Java, not counting blank lines and comments, but the Java code was mostly very familiar boilerplate, so that's not too bad. (Had to write constructors, getters, toString() methods, and equals() methods. Technically, should have overridden hashCode() too, but these students have never heard of hashCode().)

Then we got to a part of the Scheme code that relied on Scheme's built-in lists, which can contain anything, including other lists. Java has ArrayLists, but it's sort of a pain to work with heterogeneous and nested ArrayLists, so we started building a Java datatype to correspond to Scheme lists. That took about 90 lines of Java code, not counting comments, blank lines, and test cases. Except that the constructor wasn't very convenient to use: the students all agreed it really should take in a string of the form "(3 + (4 / 5))" or something like that. At which point the class ended.

These students haven't taken compiler construction. They've never written a lexical scanner, much less a hierarchical parser, so it didn't occur to them that this constructor, which approximates the functionality of Scheme's built-in "read" function, might be non-trivial. I just wrote it myself outside class, trying to keep things short, simple and clean: it took 88 lines for the reader itself, plus 87 for supporting data structures and 171 for test cases. (The reader is complicated enough that I really needed all those test cases, and many of them failed at least once.)

Anyway, we've just added 265 lines to the Java program to duplicate functionality that came for free in Scheme. Now we can get back to the original problem....

This will probably delay the course by a couple of days (especially if I don't give them my reader code), but if it conveys the lesson that sometimes it IS worth learning a new language in order to make the program easier, it'll be worth it.

[Followup Feb. 10:] At the beginning of class today, at least one student was already saying "let's go back to the Scheme version." I didn't; I wanted to use this program to motivate and illustrate a couple of Java programming patterns. So we got this minimal interpreter working (using the reader I had written), but we'll be back to Scheme on Monday.
hudebnik: (Default)
So I follow a link in somebody's LJ post to a Washington Post blog entry. And over on the right side of the page is a panel labeled "Your Friends' Activity", listing Washington Post pages that have been liked, linked to, etc. by a bunch of people I know. How does the Washington Post know this? And which of my various social-network identities is it using to figure out whom I "know"? I mouse-over some of the entries, and they show Facebook URL's. Wait: I don't even have a Facebook account (that I know of)! Oh, I bet [livejournal.com profile] shalmestere didn't log out of her Facebook account the last time she used this computer. Still, a bit scary. I guess this is the "frictionless sharing" thing they were talking about.
hudebnik: (teacher-mode)
I had brutally trimmed my slide presentation down to 76 slides, which I figured I might actually be able to get through in an hour and a half. My talk was scheduled to start at 2:15. The keynote address, however, didn't end until 2:12, and it was in a different building, so we didn't get started until 2:30. Fortunately, there was nobody in the room immediately after me, so I was able to run over a bit. Still didn't get through all the slides, as some things took longer than I expected, but I think we decently covered at least fifty of them.

I had eight participants -- not great, not bad (I once did a similar talk for three, which was demoralizing), and they all seemed to be paying attention and "getting" the important points. And several of them, I think, are seriously considering using this approach in their own classrooms -- or at least taking a longer workshop on it.
hudebnik: (teacher-mode)

I walked into my 9:25 class prepared to talk about various Prolog topics: arithmetic (and the difference between "=" and "is"), modifying the rulebase to remember state information, and recursion. But before I could get started on that, a student needed some help with the Ruby assignment I gave him two weeks ago.

In the 10:50 class, I planned to contrast Java classes and C++ classes, pointing out both the syntactic gotchas and the real semantic differences. Got sidetracked into explaining some Java issues that the students hadn't learned last year (the subtleties of writing a correct "equals()" method, and the difference between overriding and overloading).

The 12:15 class is in Scheme: I was planning to introduce conditionals today, but as usual, nobody had read the assigned reading so we spent the period writing Boolean-valued functions. Some students basically got it, while others are still doing the deer-in-the-headlights, no-idea-where-to-start thing, no matter how many times I have them work through the exact same step-by-step recipe. I've been teaching this course for ten years, and have never had a class this weak: I've already lopped ten chapters off the thirty I was hoping to cover in a semester, and they're not keeping up with even that reduced pace.

The 1:40 class is the two-student tutorial. Nominally about computer graphics, which we're doing in OpenGL and C++, but the two students are working on final projects, one of which is a compiler from Hammer to OpenGL. I had pointed out to the student that if he's parsing configuration files, he should consider using lex and/or yacc, so I was helping him with those languages. He's considering doing the project not in C++/lex/yacc but rather in Java/JavaCC, so he showed me some JavaCC. Meanwhile, the other student took time out from his graphics homework to tell me about the Factor language, a sort of Forth-made-practical that he's researching for a class presentation.

Anyway, I'm outa here, catching a plane tonight to a conference. Which will be mostly in English :-)

Posted via LiveJournal app for iPhone.

hudebnik: (teacher-mode)
First Steve Jobs, co-founder of Apple.
[links omitted; you've all seen them]

A week later, Dennis Ritchie, co-inventor of C and Unix (and therefore, indirectly, C++, Java, C#, MSDOS, Windows, Linux, MacOS, etc.)

And yesterday, John McCarthy, inventor of Lisp, automatic garbage collection, and the term "artificial intelligence" (and therefore, indirectly, Scheme, Java, Javascript, C#, Python, Ruby, Google, etc.) See
Wired, CNet, the Register, Quarter to Three.
hudebnik: (teacher-mode)
So according to this article, Google+ really is intended to collect information from EVERYTHING Google-related that you do (which may include a lot of things that aren't _obviously_ Google-related, like YouTube), aggregate it under your single identity, and sell it to advertisers. More or less like Facebook's new "frictionless sharing", in which every Web page you visit, every song you download, every article you read on-line, even in places that have nothing to do with Facebook, can appear in your Timeline for the world (or at least your friends) to read.

The idea of getting people to pay for something they want, not with money but with their attention or personal information, is not new: that's how the radio and TV industries have been funded in the U.S. for decades. But in radio and TV there's an alternative: PUBLIC radio and TV, which are funded in part by government and wealthy philanthropists, but mostly by listeners and viewers themselves, who "cut out the middleman" by paying for their entertainment directly with dollars.

The equivalent in social networking is called a "paid account". I pay the company an annual fee, and in exchange they let me name myself whatever I wish (subject to uniqueness and offensiveness rules), they don't blitz me with advertising, they don't sell my personal data to third parties, etc. LiveJournal has paid accounts; as far as I know Facebook, Google, and LinkedIn don't. And they might be able to rescue a good deal of public goodwill by offering that as an alternative.

The downside, of course, is that it creates another digital divide: privacy for those who can afford it. This didn't happen with public broadcasting because receiving radio and TV signals is a "public good", available to everybody whether they've paid or not. The problem with public goods, as always, is the incentive to "cheat": if you're going to get it whether you pay for it or not, why would any sensible person pay for it? Public broadcasting usually muddles along because there are enough philanthropists and enough people who believe as a moral position that they SHOULD pay their share of something they find valuable... but it seldom thrives.

Discuss.
hudebnik: (teacher-mode)
I'm teaching a Survey of Programming Languages course in the fall. The goals of the course are to teach students how to learn a language, and to introduce students to ideas and techniques they didn't see in their first-year Java courses; if they happen to learn a language that gets them a job, that's a bonus. They're familiar with (if not necessarily good at) class-based OOP and imperative programming; they haven't seen higher-order functions, closures, continuations, comprehensions, macros, or declarative programming in general. Most of them haven't seen any kind of parallel or multithreaded programming, nor network programming.

Traditionally, this course has been about 50% C++, 25% Scheme, and 25% Prolog, but the C++ content has been moved to another course. After polling the preregistered students by e-mail, I've decided to fill the gap with some reasonably-modern scripting language. Leading candidates so far are PHP, Python, Ruby, Lua, Erlang, and Scala.

I can make an unbiased choice among these because I don't really know any of them (although I've written some PHP-based server-side web scripts). So I'll be learning them just ahead of the students :-)

Any advice?
hudebnik: (rant)
Updating the address book database in conjunction with sending out Xmas (New Year's, Twelfth Night, Candlemas...) cards. Some things had been updated on the desktop computer, some on my iPhone, and some on the laptop. I can synch the phone and the laptop easily enough, but my phone no longer talks to the desktop computer. And I haven't shelled out for a MobileMe subscription. And the ONLY approved way to synch Apple AddressBook databases or calendars is through iTunes (what a music player has to do with address books or calendars, I don't know); Apple doesn't even want you to know where your AddressBook database IS. I can figure it out, but I don't want to directly copy databases between a machine running 10.4 and one running 10.6, because the file format has probably changed in between.

So I borrowed [livejournal.com profile] shalmestere's iPhone, which hasn't yet been updated to the latest operating system, so it's still willing to talk to iTunes version 9.x, which is what runs on the desktop computer. Synched it with the laptop, taking the option to "replace" the contents of the phone's address book with those of the computer's, then synched it with the desktop machine. But the great majority of the entries in the address book are of no interest to [livejournal.com profile] shalmestere, so I went through the database making sure each entry was in the correct folder(s), then synched her phone again with only a few of the folders.

It seems to work. Knock wood.

Cool links

Oct. 7th, 2010 06:47 am
hudebnik: (Default)
No particular connection between these, but I thought I would boost the signal:

hudebnik: (Default)
An article about the use of "Twitter bombs" -- a lot of Twitter accounts all sending basically the same message at the same time -- to influence political campaigns. Apparently a thousand or so simultaneous messages are sufficient to attract the attention of Google Real Time, which then gets millions more people to read the tweet and re-tweet it without checking whether any of it is true.

So what am I doing? Re-posting the article, without checking whether any of it is true :-)

http://www.wellesley.edu/PublicAffairs/Releases/2010/050310.html
hudebnik: (teacher-mode)
So I finished with what I had to lecture about, and told my students to spend the remaining 15 minutes of class working on their homework, while I walked around looking over their shoulders and offering help. Two of them were collaborating on a programming assignment and had turned it into a Google Wave, with a gadget that knows various programming languages (including Scheme, which we're using in this course) and automatically syntax-colors whatever you type. Kewl.
hudebnik: (Default)
I believe we're about to take possession of a Mac G4 Tower without a monitor; my tentative plan is to use it as a file server. (This is really motivated by the desire for a keyboard, since my keyboard-cleaning experiment last week was less than totally successful; the computer comes as a bonus :-) I should be able to ssh into it, so I can administer the Unix side of things, but I don't know how difficult it is to administer the Mac side of things remotely. Paying $300 for Remote Desktop seems like overkill for my minimal needs. Has anybody on my tech-savvy flist done this sort of thing?
hudebnik: (Default)
To me, the word "sync" means "here are two collections of data which should theoretically agree. For each atomic item that differs between them, replace the older version with the newer version. If you're not sure you can do that safely, tell me the differences and ask me what to do."

I'm not sure what it means to Apple, but it apparently does not consistently include copying from the phone to the computer if what's on the phone is newer. That might lead to somebody somewhere using a phone to easily transport information from one computer to another, which might mean one less paying customer for MobileMe.

Apple's iTunes does sometimes "tell me the differences and ask me what to do," but only for calendar events... and even then, my decision apparently determines what goes onto the phone, but not what goes onto the computer. As a result, I have to resolve the exact same difference again next time, and the time after that, until I give up and accept the version that's on the computer, even though the version on the phone is right. (Then I usually open the .ics file in vi and fix it the hard way....)

And why is it impossible to sync a phone with more than one computer? Because, again, that might lead to somebody somewhere using a phone to easily transport information from one computer to another, which might mean one less paying customer for MobileMe.

What does "do not sync" mean? To me, it means "don't modify either of these collections of data." To Apple, it apparently means "delete the collection on the phone," because a phone is just a mirror of (part of) one particular computer, so if you don't want the data on your phone to exactly match data on that computer (which is of course the only one on which you will ever use the "sync" feature), you must not want the data at all.
hudebnik: (teacher-mode)
Take a look at this video (SFW) about how we (could) interact with computers.

(Borrowed from this post by [livejournal.com profile] jducoeur)

Profile

hudebnik: (Default)
hudebnik

September 2017

S M T W T F S
     12
3456789
10 111213141516
171819 20212223
24252627282930

Syndicate

RSS Atom

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Sep. 22nd, 2017 01:25 pm
Powered by Dreamwidth Studios