word

Nov. 2nd, 2020 11:30 am
chhotii: (yummy)
I am transcribing here this paragraph from Hacking Healthcare almost word for word because it so beautifully hits the nail on the head:


Many technologists are used to... exclusive options... for male or female. In fact, this is the perfect example of the type of two-value choices that are appropriate in typical software design... but totally inappropriate for clinical software. For any clinician there are at least three genders: male, female, and other (as in "You better pay attention to this clinical issue"). For any clinician who treats gender-related conditions there are many, many more. It is clinically dangerous to ignore gender-related clinical issues by forcing clinicians to choose either male or female...

...Checking to see how many options are available for gender is a great way to determine how mature an EHR system is. If there are only two choices, the software should be considered dangerously immature.


YES!!! YES!!!!!! OMFG YES!!! This book is from 2013 and it recognizes this reality. And yet, years later I was complaining about the patient registration system and the hospital was like, we gotta know if the patient is really a girl. Eye-roll.
chhotii: (Default)
I tried to throw money at the problem of needing masks, good masks, several masks for each of us. This failed spectacularly.

I bought one from a vendor on Amazon and it's awful. The ear loops are too long and floppy— even though it's supposed to be my size. It was falling off all the time until I tied a length of t-shirt yarn around the back of my head, attached to the ear loops. Tacky but functional, but now all my exhaled breath shoots up the sides of my nose and fogs up my glasses like crazy.

My mother bought a mask for Vic with a cat's mouth pattern, which seemed like a cute idea in concept— but the mask's fit is terrible, and the cat mouth is scary and weird and awful. Vic rejected this mask totally.

Ordered masks from various places, but they are all back-ordered and will arrive who knows when.

Vic ordered some clothes from Uniqlo, and, while they were at it, a package of masks. I tried to talk to Vic about looking at the cute masks offered for sale on Etsy, but they responded in irritation "I already ordered masks! From Uniqlo!" OK!

But then FedEx lost our Uniqlo package. Tracking information went from "at FedEx facility in Northboro" to "expected to be delivered today" to "to be updated when we have information from the shipper". This was the weekend before Vic had an in-person start-of-school activity. Outside and socially-distanced, but still.

Out of desperation, I set myself to trying to sew one of the mask designs I had been admiring. The Fabric Patch lady has most recently been recommending the "Jesse" design. Reading Jesse's FAQ, one of the questions is "can I use any fabric I like? Denim?" to which Jesse says "sure!" I had been thinking that making a mask out of denim was a bad idea, but someone else had thought of the idea, and thought it not a bad idea, at least not Jersey-barrier-bicycle levels of bad; so I thought, I should try this, once. Unify my hobby and passion (making things out of reclaimed denim from old jeans) and what I feel I need to get done (a mask).

And, actually, the mask made out of up-cycled denim is not terrible. It's actually better than any mask I've bought. It's kind of big and bulky looking, not attractive, and the fabric is so thick, it's a bit tricky to get my glasses to sit right. But it fits well, it's reasonably comfortable, and my glasses don't fog up at all. It's surprisingly breathable. I wore the denim mask on our outing to the fabric store, and had a nice and relaxing time browsing through all the fabric, and not once did I think "oh god let's get this done with so I can take this mask off." I think the denim mask would be rather warm for taking outside exercise, and I need to explore lighter fabrics for that.

The brilliant part of the design is the use of a coffee bag closure for a nose bridge. Fortunately, I have been saving the bendy strips off the top of coffee bags for a bit (having had it in might for a while that I should make masks).

Vic's sense of style was deeply offended by the denim mask, but they agreed that the design looked promising otherwise. So I made another mask, purple, lighter fabric, which Vic thought was... better. Vic wanted to go to the fabric store to pick out the perfect fabrics for this, inside and out; and requested some changes to the design.

I've now made 6 or 7 masks and I've run out of coffee bag closures. I ordered a package of coffee bag closures off of Amazon. These come in packages of 100, and each 7" strip is enough material for 2 or 3 nose bridges. Vic and I do not need 207 masks. I want enough that we can each have a fresh one for every outing, and I do laundry approximately once a week. These go into the washing machine, but not the dryer, so they are not ready to be used again immediately after laundry, but have to sit and dry for a day or so. So maybe... 10 each? At most. (Vic does not leave the condo every day, but I get restless.)

My shipment of coffee bag closures is scheduled to arrive next Monday, the 21st. I will then make all the masks Vic and I will ever need. After that, I might be persuaded to make masks for other people, and/or share both what I've learned about mask making and some of my enormous supply of coffee bag closures.
chhotii: (Default)
Now it seems that devices in my home— all on the same subnet— cannot talk to each other. The router is 10.0.0.1. The subnet mask is 255.255.255.0. Everyone can talk to the Internet, out there, just fine. But, for example, Vic's PC is 10.0.0.209, and this computer is 10.0.0.229, and neither one can ping the other. OK, so maybe ICMP packets are not being allowed? But, Vic's PC cannot connect http on my computer, port 80. Or anything else I can think of to try to connect amongst our devices.

This would explain why suddenly I can't get the printer to work.

Discovered this because I thought I was all masterful to have set up a Docker container for a Minecraft server— and then Vic's Minecraft program couldn't connect to it. This deflated me, thinking there was something I was missing in the configuration of the Docker container or the Minecraft server therein. But no; if I spin up Apache on port 80 my computer, and Vic's web browser can't connect to it, this has nothing to do with Minecraft. Just, completely, wtf.

Yeah, I've checked that the firewall is off on my computer and set to "medium - typical" on the router.

Is having devices on your home LAN being able to communicate with each other something that people just don't do anymore?
chhotii: (diploma)
From https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie : The Max-Age attribute of the Set-Cookie header specified the number of seconds until the cookie expires.

Guess what unit of time the expressjs module uses for the maxAge property? From http://expressjs.com/en/resources/middleware/cookie-session.html :

Milliseconds!

So, my cookies were expiring 1000x faster than I expected they would. That explains a lot.

Seriously, I have exceeded the Max-Age for putting up with such bullshit.
chhotii: (apple)
Phi's a smart guy, so I'm willing to entertain the notion that he put forth that a NoSQL would've been the Right Tool (TM) to implement Facebook. I don't have time to re-write Facebook. But, so, for my class project— which is just supposed to be a tiny little toy program— I'm trying to implement just a teeny, tiny little bit of Facebook-like functionality. Just really basic stuff. Like, for example, you should be able to comment on comments, and comment on those comments on comments, etc., recursively, to a pretty arbitrary depth. (I don't use Facebook so I wouldn't know if Facebook doesn't actually do this. I do know that you can have seemingly arbitrary depths of comment nesting in Dreamwidth/Livejournal, and in whatever Captain Awkward uses for her columns— WordPress? Seems like pretty basic functionality.)

Maybe this is the wrong NoSQL database, but I'm using MongoDB (with mongoose on top) because that's what was taught in the class. Taught in a very shallow way. Maybe MongoDB is a toy, but it seems very popular. Like, people say that they are doing real projects with it?

Here's what I just posted to the class discussion forum:


I am getting frustrated with MongoDB trying to put embedded documents into embedded documents.

Here's the structure of my data: A Group can have many blog posts. Each blog post can have many comments. In turn each comment can have comments, which can have comments... This part of the schema, at least, is very hierarchical, so I'm trying to do it with embedded documents. Here's the relevant parts of the schema, n.b. that I use the same data structure for blog posts and comments ("Post"):
let groupSchema = new Schema({
    name: String,
    nickname: String,
    banner: String,
    threads: [postSchema],
})
const Group = mongoose.model("Group", groupSchema);

let postSchema = new Schema()
postSchema.add({
    title: String,
    bodytext: String,
    comments: [postSchema],
    photos: [String],
    isPublic: Boolean,
    isPublished: Boolean
})
const Post = mongoose.model("Post", postSchema);

Here's a function which should add a comment to a post and then a comment to the comment:
exports.addCommentsToPost = async (gnick, id) => {
    let group = await Group.findOne({nickname:gnick})
    let post = group.threads.find(element => element._id == id)
    let comment = new Post({
        title: "this is a comment",
        bodytext: "here is the body of the comment",
        isPublic: true,
        isPublished: true,
        comments:[ ]
    })
    post.comments.push(comment)
    await group.save()
    console.log("ID for comment:" + comment._id)

    let metaComment = new Post({
        title: "meta-comment",
        bodytext: "And I have a comment on your commnt.",
        isPublic: true,
        isPublished: true,
        comments: []
    })
    comment.comments.push(metaComment)
    await group.save()
    console.log("ID for comment on comment:" + metaComment._id)
}

When I run this, I get something like this on stdout:
ID for comment:5f37f1e41bfca6268d65dbae
ID for comment on comment:5f37f1e51bfca6268d65dbb0

This suggests that mongodb "saw", in some sense, not just the comment but the comment on the comment? It did give them both _id fields.

However, when I find the top-level post in the database, here's what gets returned:
{
  photos: [],
  comments: [
    {
      photos: [],
      comments: [],
      _id: 5f37f1e41bfca6268d65dbae,
      title: 'this is a comment',
      bodytext: 'here is the body of the comment',
      isPublic: true,
      isPublished: true
    }
  ],
  _id: 5f37f1d11bfca6268d65dbac,
  isPublished: true,
  bodytext: 'This is the text of my blog entry.',
  isPublic: true,
  title: 'what I did on Saturday'
}


The comment on the top-level post is there. But the comment on the comment is gone. The comment's comments value is an empty array.

What am I missing?


Surely I'm missing something. There must be some function I'm not calling or something I'm not setting somewhere. But in Googling this one would think I was asking for how to do something really advanced and esoteric. What??? Surely it's not the case that most projects out there in MongoDB have all the complexity of an address book. So, surely, this is something that many people have had to do... Why do I feel like I'm bushwhacking a new path into the wilderness? Why can't I find the wide well-trodden path? What kind of genius does it take to do something more complex than an address book in the NoSQL? In contrast, with SQL, with just a few simple easy to understand keywords, you can put together data schema of any complexity.
chhotii: (apple)
To preserve my sanity and keep from burning out I intend to try to wall off my weekends and avoid doing work on actual work for my actual employer.

So today is to be devoted to life-maintenance tasks, right?

One of those is to make sure that home computers are backed up. I have a script I wrote years ago that invokes rsync. Apple keeps making this challenging to maintain.

It's pissing me off that when rsync is backing up the Macs with the newer versions of the OS, it seems to think that for every file I've ever created, there's a companion file with the same name prefixed with ._. And these companion files are never ever up to date on the backup drive, are they, rsync? You feel the need to back up every darn single one of them. Every time. I'm sure that the ._ files are bullshit so I tried adding this to the --exclude-from file:
- ._*
Nope, that doesn't change anything. But do these files even exist? Typing ls -la doesn't show them on the client machine. What the heck? Google research reveals that these are the metadata-- what we would've called the resource fork in the day. I'm sure these are bullshit, so I should try running rsync without the -E option.

Bigger problem, potentially: when it's backing up the computer that just got upgraded to Catalina I get this:
rsync: opendir "/Users/alex/Documents" failed: Operation not permitted (1)
etc. For my home folder Documents, Desktop, and some other places. In other words, exactly where there's likely to be files that I do, in fact, want to back up.

I'm trying to follow the advice here https://developer.apple.com/forums/thread/126497?answerId=396749022#396749022 but rsync doesn't show up as something begging for admission in System Preferences. Nor does anything that might be plausibly starting rsync, which might be launchd or launchctl. Tried adding /usr/bin/rsync to the list in System Preferences; let's see if that works.

I cannot attach a Time Machine backup drive to every computer in the house. Somehow I do not regard that as acceptable. So I do want to continue using rsync over the network. Has Apple finally created a show-stopper? Unless I change my ways a bit, and stop storing files of long-term significance in ~/Desktop or ~/Documents (~/ is unaffected by this). In other words, totally go against the grain of what Apple expects me to do-- rather than store ALL important documents in ~/Documents, store NONE of them there. Hmm.

...yeah this is an adequate change of mental scenery from what I'll start doing on Monday, riiiiight...
chhotii: (Default)
You know what would be awesome right now as I test this bit of php code? Would be if Apache would pipe things to be logged to a script of my choosing rather than writing straight to a .log file. Or, you know, do a tee, so it goes both the the .log file and my script. Right now I want to know right away when something pops up in the log, without having to command-tab to Console after each action. A shell script that just contains:
say "danger, will robinson"
would be just dandy right now.

I'm sure there's a way to do this, but my Unix-fu is not strong today.
chhotii: (Default)
I have Thoughts. About Stuff. I considered ranting about said stuff here on dreamwidth, but... no. It would be very fraught to bluntly and frankly say what I have to say.

I wish we were getting together in real life, dear reader. Then, depending on how deep you wanted to get into Topics, we could have a one-on-one conversation about this, without my having to commit to having my preliminary thoughts out there on the Internet for all time.
chhotii: (Default)
My script: "Warning, user! Things are not set up right! Please follow these instructions to get things into order! Do you want to continue anyway, even though I don't think things will work? (y/n)"

User: "y"

My script: churn, churn, churn for several pages. "Error! More error! Lots of bizarre errors! Aaaah suffering fail! Error code! Try to address the errors and try again."

User, to me: "Alex this never works any more. Why doesn't it work???"
chhotii: (apple)

Call me old-fashioned, but I do not grok NoSQL databases.

The "No" in "NoSQL" is supposed to stand for "Not only", supposedly. But I think people think of it as "NO SQL" like "look! No SQL in my codebase! Hah hah hah hah I got away from SQL! Yay!" Like... SQL is a bad thing?

OK, I know, SQL is terribly dorky. And there's the infamous object-relational impedance mismatch. Object Relational Mapping (ORM) frameworks try to overcome that, but they are tricky to get right.

But... when the ORM runs into difficulty, it's because there's a really real issue to grapple with. Here are some really real issues:

* How do you deal, in the most general way, with foreign key references? Let's say you have a course catalog database with tables named Course and Professor. Let's keep this simple and say that each Course has one Professor. Thus a Many-to-One relationship from Course to Professor, which, in a relational database, we deal with by having a professorID column in the Course table. OK. When we fetch a list of Courses into our application, do we just select from the Professor table? Then we just have the professorID for each Course, not the names of the Professors. If we're showing a listing, on which we want to show the professor names, a SELECT from Course could get followed up by 1,000 queries on the Professor table as each professorID is resolved. Or, do we do a join? That's the smart way to use the relational database. But how does the ORM know that in one context, when we get a bunch of Professor objects, we will be looking at Professor objects and should do a join, but in another context not?

* How do we cope with changes to the database schema? Maybe records created before some date are different, in terms of what data they contain.

When folks announce that they have developed some tremendous magical new tool that does away with all the headaches of SQL and ORM, often they've just swept the issues under the rug. They show off some demo that they've CRUD some data with nothing that looks like SQL involved like wheee!!! But the demo is so small it just doesn't run into any foreign key or versioning issues. Or the issues are so small they can be ignored.

Example, here's some sample code from my professor, who is teaching us the minimal basic getting started in MongoDB and the mongoose module:

var mongoose = require('mongoose')
var Schema = mongoose.Schema;
var courseSchema = new Schema({
    courseNumber: String,
    courseName: String,
    courseDevelopers: [
        {firstName:String, lastName: String}
    ]
});
// skipping buncha connection etc. code here...
course = new Course({
    courseNumber: 'cs601',
    courseName: 'Web Application Development', 
    courseDevelopers: [
        { firstName:'Eric', lastName:'Bishop'}
    ]
});
course.save();


Already I am screaming. As someone trained to think in terms of normalizing relational databases, I see a glaring hideous problem here. In case it's not obvious yet, let's go on:

course = new Course({
    courseNumber: 'cs602',
    courseName: 'Server Side Web Development',
    courseDevelopers: [
        { firstName: 'Eric', lastName:'Bishop'},
        { firstName:'Suresh', lastName:'Kalathur'}
    ]
});
course.save();


AAAAAAAAaaaaaa!!! Seriously, you are going to have someone enter the name 'Eric Bishop' twice, for the two different Courses? No no no no. Not to mention the fact that that might not make for the most efficient data-entry UI; what if there's a spelling or hyphanization or whether one uses the midddle name discrepancy? Then we can't do a query relably for "what are all the classes taught by Eric Bishop?" What if there's more information we should have on each Professor? Seriously, do we have to explain the benefits of database normalization all over again?

Looking at the MongoDB documentation. Surely there's a way to attach existing ProfessorSchema documents from the Professor collection. But does that create a linkage in the database, or does it duplicate data? If 'Eric' 'Bishop' is updated to be 'Erin' 'Bishop' now in the Professor collection, is that reflected in the course listing when Course documents are fetched? In other words did they re-invent the join?

Well... sort of. There's the $lookup feature. Not sure how scalable that is for the full range of uses of the join concept.

Here's an article that stronly suggests to me that the NoSQL fad is a cooler of Kool-Aid: http://www.sarahmei.com/blog/2013/11/11/why-you-should-never-use-mongodb/
chhotii: (Default)
This morning I don't think I'm ill; I had the energy and concentration to focus on doing my bit of campaigning for the Harvard Forward slate of candidates. To-done so far this morning:

- edit my "why I'm supporting Harvard Forward" letter again
- apologetically email the Climate Action Brookline, being abashed for not dealing with the Markey campaign of late, asking him to share my letter with any Harvard people he knows
- slog through LinkedIn to search for people I know who went to Harvard, find several
- research and inquiries to find email addresses for them all
- email the letter to all my contacts
- tweet about this
- dm a couple of people who might need help figuring out how to vote

OK, enough on that project. I'm not connected enough to pull a lot of weight on that particular campaign. And it's not like electing these candidates is synonymous with saving the planet. The Harvard Forward platform is pro-divestment; whether divestment is the ideal strategy to do something about energy usage and climate change is a question on which reasonable people can reasonably differ. But, to make noise about that issue whenever possible, and to normalize bringing up climate change as a central issue-- that's the point.
chhotii: (Default)
When did this one come out? https://xkcd.com/2287/

One of the pathogens says "It's not over, right? They can't sustain this. They must be bored and tired... Will they give up?"

Well... not psychic-level spooky prescient. Many Republican political leaders were bored and tired of this since before the first U.S. case.
chhotii: (Default)
I don't think this is how bioinformatics is actually done. https://xkcd.com/2298/

sewing

Jul. 4th, 2020 07:58 am
chhotii: (Default)
The sewing machine died a couple of weeks ago (or a few weeks ago? I can't keep track of time any more.) I took it apart a few times trying to figure out what was wrong but was just stumped. At the time I was really trying to get a project done. So I took it to a place that does sewing machine repair, allegedly. Actually, what a sewing machine repair shop does is to look down their noses at your sewing machine and say "it would be $200 to repair that, so why bother when you could buy a refurbished machine for only $50 more? Here's a refurbished machine that you will be happier with for only $250!" So I walked out with a new-to-me sewing machine.

They were right. I am happier with this machine. It's a stronger machine, so it deals with thicker layers of tough denim.

I have been unable to summon up enthusiasm for sewing masks. I feel like I should sew masks. I have a sewing machine and all the sewing things and time to sew. I'm certainly all in favor of wearing masks to reduce the spread of COVID-19. There are many very nice masks that one can buy. But as long as I am unemployed— and don't see my way out of unemployment— my intention is to set the policy that if there's a cheaper but more time-consuming way to do something versus a quicker but more expensive way to achieve the same goal, then for now I should opt for the cheaper but more time-consuming option. So, given the choice between "buy mask" and "make mask" I should make masks.

That's not what I'm passionate about doing, though. Sewing is my once and future hobby, but not just any sewing: the sewing that brings me pleasure is to recycle worn-out old blue jeans into new useful non-clothing things. Primarily reusable grocery bags and totebags, although I've also made a pocketbook, various other types of bags, a pincushion, a plush toy, a trivet, upholstered sofa cushions, and I've contemplating making a wall hanging. I'm willing to branch out into recycling pants of any tough fabric— jeans of any color, corduroy. A mask, though, can't be made out of such fabric. I think you really would suffocate in a denim mask. I want a mask of very light fabric so I can breathe through it. I'm quite fond of breathing. For this, I need to chose a lighter thread, and wind a bobbin of that, and maybe have to adjust the thread tension, and probably change the needle. This has been endlessly procrastinated and I've been going around with a bandana tied around my face, or re-using the disposable procedure mask I got at BIDMC until it falls apart.

I'm so passionate about making grocery bags out of jeans and have had so much time to spend on that that I've mostly worked through my supply of old jeans. I've even used the 3 pairs of jeans that Joc just gave me recently. I need to ask around and get people to clean out their closets of old jeans again.

This is a bad time to pursue the old-jeans-into-bags hobby, though. The plastic industry jumped on the COVID-19 as an opportunity to sell more single-use plastic bags, by putting forth the bogus theory that reusable bags could be a vector for disease. They managed to bend the ear of the Governor of Massachusetts, and thus Massachusetts banned reusable bags. Not that you entirely can't use reusable bags. There's a little local store where they seem to have not noticed the ban. At CVS the cashier didn't touch my reusable bag, but did let me put my purchases in my bag. It's fraught, though. I've found out the hard way that I get yelled at for trying to use reusable bags at Star Market and at Walgreens. Reusable bags now have this image problem of being perceived as dirty, even though my bags are perfectly washable. I could wash them on hot and dry them in the dryer until crisp after every use and they would be fine. They're jeans.

This makes it an awkward time to try to persuade people to reduce their use of plastic by adopting my bags. I have many bags available for adoption, and if I get more old jeans and keep sewing, I will have many many more. It's a hard sell, when not only would one have to learn to get into the habit of remembering to take the reusable bags, one now also has to figure out, for each store, how hostile a reaction the bags will receive.

Also, perhaps people are not so quick to discard old clothing at this point? I know I am. Can you buy new clothing at this point in time? On-line, sure; but jeans, I find, I need to try on before purchase. So I am continuing to wear my own disgustingly worn-out and ugly old jeans rather than figure out how to buy new clothes. And, with the massive unemployment; new clothes are expensive, one might want to try to make do with the old clothes. And, in quarantine, who's going to see the big rip in your old jeans anyway?

That being said:

1) If you have old, worn-out and/or unfashionable and/or ill-fitting jeans uselessly using up space in your closet, give them to me!!!!

2) If you could use a totebag, or 3, let me know. Totebags free to a loving home if they will actually get used ever.
chhotii: (apple)
Dear friends,

On July 1 Harvard opened its elections for the Board of Overseers and Board of Directors. As alumni of any school within Harvard, we have the opportunity to have a say in the governance of this very influential institution. Please, if you haven't voted yet, put this on your to-do list. I would suggest that you take a look at the slate of candidates endorsed by Harvard Forward, and look at the Harvard Forward platform. The website is here: https://www.harvardforward.org/

For me, the crucial issue in this election is whether Harvard will take a stand against the continued trashing of our planet by divesting from the fossil fuel sector. I realize that divestment is an indirect way to try to influence energy companies. In terms of actually affecting these companies, its value might only be symbolic. So, why bother with divestment? If someone will inevitbily profit from fossil fuels, then why not Harvard? Let's run a thought experiment: What if Harvard had investments in companies that participated in slave trading? You'd want Harvard to drop those like a hot poker. I'm not equating fossil fuel extraction with slavery, but just pointing out that at some level of moral repugnance, divestment becomes compelling, regardless of practical or economic arguments.

Looking at today's hot weather and the reports of unbelievable Arctic melting, sadly so predictable decades ago, I believe that the time has come to regard investment in fossil fuel extraction as deeply morally repugnant. I know, I know; we're all still putting gasoline in our cars. There's quite a bit of momentum in energy usage throughout our economy and infrastructure. We can't turn on a dime and electrify everything overnight. But-- to continue the "momentum" metaphor-- humanity is headed towards driving over a cliff. Rather than trying to brake and steer away from the cliff edge (as a few of us crazy crazy environmentalists are trying to do), an investment in fossil fuels represents an interest in holding the wheel straight and continuing to press hard on the gas pedal. I would call that evil. Why does Harvard-- an institution that clearly believes in science, and whose purpose is to prepare its students for the future-- insist on continuing to be a party to evil?

I recognize that, while not embracing divestment, Harvard is taking steps towards making its investment portfolio carbon-neutral. That's awesome! I do think that those efforts will be extremely useful in motivating corporations to take a look at their sustainability practices. I applaud what Harvard is doing in that regard. But I don't think this deflates the argument for divestment. Harvard could do both-- both make the big symbolic statement of divestment, signaling to the world that the fossil fuel business is just not cool any more; and continue to press for a sustainable economy overall. We need to do both. We need to do everything we can. With these preposterously high temperatures in the Arctic this summer, Earth is shouting at us to react to this crisis as an emergency.

Thanks for taking "if you don't vote, you can't complain" to heart. If you sympathize with my agitating for a livable planet, can you also pass the word on about Harvard Forward to other Harvard alumni? Thanks!

Alex
chhotii: (diploma)
Coding test from heck

Recall that I had an on-line assessment for a job application, and on the second coding challenge, I derailed because for the first test case, the expected output was wrong.

Here's the question, as best I recall:

N alumni have been invited to an alumni dinner. Each alumnus is assigned a numerical ID and they are numbered starting from 1. Each alumnus likes exactly one other alumnus (although each alumnus may be liked by zero, one, or more than one other alumnus). You are given an array which gives the ID of the alumnus liked by each alumnus: for example, the array 2, 1 means that alumnus #1 likes alumnus #2 and alumnus #2 likes alumnus #1. Each alumnus will only come to the dinner if they may be seated next to the alumnus that they like. (They won't like the alumnus on their other side but that's OK.) The alumni will be seated at a circular table. Print, as a string, the seating arrangement that includes the largest number of alumni. If there's more than one such possible string, print the string that would be ordered first in lexicographical order.

In the input you are given N on the first line, and the array (space-separated) on the second line.
For example:
Input:
4
2 3 4 1

Output:
1234

Note that this works because the table is round. Alum #4 likes alum #1; they are next to each other because the first and last are adjacent.

My thoughts and solutions (plural!) and commentary below cut. Before you peek, try giving this a whack; I'm curious as to how other people find this problem.

Read more... )
chhotii: (diploma)
Can we just pause a moment and roll our eyes really hard at the idea that Arisia is all about Doc Smith Lensman fandom? And the idea that if we're ditching some of the Lensman iconography, we should ditch the name Arisia, because it's all about Lensman?

OK, even though I've never read a bit of Doc Smith, not even a synopsis, I get it: apparently, if you've read it, "we're the not-Boskone... so we are Arisia!" is a really really funny joke for half a second. But then when you stop laughing it's still a pretty good name. It's short. It's distinctive. Unlike Boskone, WisCon, PhilCon, BaltiCon, Baitcon, Confluence, WorldCon, or ConFusion, it's not some forced tired play on the word "con", the universe of such possibilities having been completely wrung dry by now. It's what this particular 'imagined order' is now known as.

Some older fen are shocked that so many of us have never read the relevant book(s) and don't know where the name "Arisia" came from. I don't care. I used to feel like an imposter in the sci-fi world because I had managed to wade through so little Heinlein and Asimov. But fuck that. Maybe there's reasons Heinlein and Asimov don't speak to me. I don't know. What I do know is that Vic and I need a community of people who have also watched Deep Space Nine. So, there, that makes us the target market for something like Arisia.

Life is too short to fret about the fact that I haven't read Lensman. Maybe, someday, I will have spent so much time waiting for the slow as fuck printers at NESFA to print stuff that I will have finished everything written by Bob Stickgold that NESFA has, and go casting about, and pick up Lensman. But, no promises.
chhotii: (mail)
I haven't been working on the on-line voting software lately. Given that OpaVote is more mature, quite slick, and quite affordable, the chance of my code ever being actually used seemed remote. Having worked on my software as much as I did served was useful: I did learn a lot, and my efforts have impressed some people, and that has had some fruitful outcomes. But, ready to move on to other projects.

But there's so much demand out there for something good in this space. I'm watching Brookline Town Meeting on TV, and it appears that whatever software they are using for voting in the on-line version of Town Meeting SUCKS. Truly appallingly horribly bad. And this is probably one of the biggest towns in Massachusetts run on the Town Meeting system.

Not actually a business opportunity for me at this time. What I have doesn't match their requirements at all. I don't have the cycles to even figure out their requirements. Just, observing this.
chhotii: (diploma)
B.U. Metropolitan College has admitted me to the Masters of Science program in Computer Science, and I have accepted! More education and diplomas, generally a good thing.

Unfortunately I have missed the deadline to start any summer-term classes. So, this process only really starts in early September.

The path ahead is somewhat hazy. I don't know if I will have a job by September. Depending on whether I have a job with a steep learning curve, an easier programming job, a menial job, or no job, I might start taking anywhere between zero and 4 classes in September.

Also, with COVID-19 going around— and the government generally in denial about how long that's going to be bad— it's not totally clear how this is going to work. This is supposedly an "on-campus" only program, not one with a remote option. However all summer term classes have been move to on-line. It's not totally clear to me whether that will change by the fall semester. It should be totally feasible for these classes to be entirely on-line. It would be fun to be able to use the campus amenities, but, oh well, that's not the thing to do in the times we live in.
Page generated Jun. 13th, 2025 10:56 am
Powered by Dreamwidth Studios