Wednesday, September 9, 2020

If I were king of the digital camera universe, I would make one that really was programmable. It is hilarious how much of a lock-in the camera hardware manufacturers have. And they don't seem to be worried or understand that one of the reasons cell phone cameras are better is that you can get arbitrary software for them. (Yes, it must be a really weird and tricky business because so many things are contributing to killing off the entire non-smartphone camera market. So I can understand the companies getting ever more paranoid.)

To wit, a feature I haven't seen (?) on DSLRs or MILCs is: Whatever lens I attach, in Aperture Priority, default to choosing the widest-stopped-down-by-one F# for that lens. This is to try to have a simple default hack value for getting most bokeh but also not having the worst image sharpness.

Or, if Sony let folks push new menus to their cameras to replace the horrible badness they ship by default, maybe they'd sell some multiple more. Because people who value UI UX enough aren't going for Sony even though their CAF & tracking is purportedly by far the best.

I guess if I had the money and time and connections I would be working on an open source camera system that was super flexible like this. Maybe comes with some block scripting like Scratch. It wouldn't even have to be very high resolution, or super fast, it would just have to be like 16mp and heck it could even just use CDAF to start off with.

Because, I mean, almost nothing can be worse than the software that the major camera makers ship. The Olympus iPhone app is horrible. All the Canon Windows apps are horrible. Etc.

Monday, September 7, 2020

we don't know how to write good code. which means the things which ideally should be very robust are of course just as open to bugs as anything else. to wit, compilers.

typescript is great! in all seriousness, i pretty much would never want to do regular js ever again after using ts.

except for all the ways it isn't. kinda depressing how it comes across to me as being over advertised, over hyped, has lies by omission, leads people down garden paths into being painted into corners.

to wit: there is a lot of stuff online about how wonderful interfaces are in typescript, and i do like the idea of some of the pros about structural typing over nominal typing. but it turns out that if you choose to try to go with interfaces for the most part, you are not going to be able to do some things that you might at some point very desperately wish you could do, like instanceof since that only works with classes and their constructors. i mean sure it is ok for the two approaches to be different, but it would help if the actual "oh three weeks from now you are going to be kind of screwed and feel like you need to rewrite all your code" type gotchyas were more explicitly called out up front.

there's other things that are real sharp edges in the typescript system i suspect because they are (a) hampered by the hell that is javascript itself and (b) they have gone a little too bananas overboard with the cool things they could possibly do even though they apparently try to not do too many things. to wit see the problem i ran into with exhaustiveness checking of enums, code at the end of the post. (to be fair, enums are a broken living hell in almost every language, even the ones that aren't saddled with backwards compatibility.) also there's the problem where type aliases cannot be used everywhere a type can be used, which is really pretty horribly lame iuam.

...and then seems to have a rather broken discord system.

me writing to "Robert" who has set up the help cooldown and who says that if cooldown is broken to message him directly to fix it: "hi, apparently the help cooldown hasn't gone away for me although it[']s been like 20+ hours."

BOT replying to me: "Your message could not be delivered because you don't share a server with the recipient or you disabled direct messages on your shared server, recipient is only accepting direct messages from friends, or you were blocked by the recipient."

...so i am kind of dead in the water with tsc right now because of something that looks like this but worse where i cannot get the compiler to actually work correctly at all right now.

yay! so my 6667+ lines of code are now kinda like a dead albatross around my neck? would i have been much better off with Flow? can i easily strip all the typescript stuff from my ts code to get vanilla js? i think that was easy with flow back when i was uing it, but i dunno these days.





/* !!! update: the issue turned out to be that "_: never" is the wrong thing to write. the internet helped me find out (certainly the typescript compiler did not) that i should instead use "_: unknown" and then the hallowed exhaustiveness checking started working for me, yay !!! */

function unreachable(_: never): never {
throw new Error("unreachable");
}

const enum Facing {
left,
right,
}

function on_facing<R>(facing: Facing, left: R, right: R): R {
switch (facing) {
case Facing.left: return left;
case Facing.right: return right;
default: unreachable(facing);
}
}

const enum FacingMask {
left = 1 << 0,
right = 1 << 1,
}

function on_facingMask<R>(facing: FacingMask, left: R, right: R): R {
switch (facing) {
case FacingMask.left: return left;
case FacingMask.right: return right;
default: unreachable(facing);
}
}

it is "funny" (as in pukey, not ha ha) that what i would have hoped could be standard stuff isn't actually standard, in particular at the moment on my mind a lot are the home/end vs. pageup/pagedown keys on keyboards, and what they do in programs.


like, xcode seems to want to interpret home/end as being for the whole file rather than how i think it works in most other ide's where home/end is for the current line, and you have to use a modifier key to get it to be for the whole buffer. the latter behavior is better, i think. it certainly seems to be what my fingers are motor-memory expecting.


then there are things like the kinesis keyboard that has those keys vertically from top to bottom as: home, end, pg up, pg down, then the arrow keys. which feels again utterly wrong to me because home/end should really be on the line, not the whole buffer, so they should be closer to the arrow keys than the pg up/down that cause the cursor to jump way farther.


i just don't understand other people sometimes when it comes to (admittedly somewhat subjective) user interface and user experience and usability.


Friday, September 4, 2020

you cannot save (as in, redeem, rescue, fix, improve, ameliorate, etc.) javascript very much, is what i have learned from all the tools and languages i've used over the years that purport to do so (eg typescript and flow). they maybe help a little now and then but the abstraction is sooooo olestra leaky that it kinda ends up being such a big fat lie that it is almost worse in some regards. apparently, however, you can make the whole thing even worse by having tools that are apparently broken junk. why is "this" undefined, but "this.db" isn't? etc.




 FORGET ZEN!


I NEED TO LEARN PI!


 

Probably the last place to look for first-class Usability, User Interface, User Experience, etc., is in anything related to programming. The worst people on earth, empirically, to be responsible for how software is created are the programmers themselves. Just take a look at IDEs, one of the most fundamental tools used in software development. Pretty much they are all nightmares. Personally I think the IntelliJ stuff is the rare exception that proves the rule, and even that isn't free of bugs and weird bad unergonomic usability problems. 

Since both my day job and one of my hobbies is programming, I really am day in day out depressed about the whole situation. Is it because only money talks? Is it because we are all too stupid to do a better job? Is it because nobody is aware enough to realize that the emperor has no clothing? Is it because in reality getting such a complicated system to not suck is a super hard problem, both just technically but also because usability has a fair amount of subjective preference involved? Is it all of the above? Well, yes, probably, yes.

:-(

Even if you ditch the GUI kind of IDE and are just using VIM or Emacs or Notepad++ then you still have all the problems of how broken the UX is of the programming languages themselves, and all the other non-GUI-IDE ancillary tools.

Anyway, the idea of achieving any kind of "mental state of Flow" with programming has long since vanished in my life, really. There are a few times when I have maybe 10 minutes of it because I am noodling on one small thing, but even then I am usually constantly hitting horrible UX fails of the IDEs.

c’est soupirer