Readit News logoReadit News
MikeTV commented on Writing GUI apps for Windows is painful   tulach.cc/writing-gui-app... · Posted by u/wild_pointer
ack_complete · a year ago
Afraid not, had to piece together a lot of it myself. There are lots of examples available for various components of varying quality -- you'll find some code examples that don't work well with high DPI or all of the sub-modes of a control.

Some controls like buttons, list boxes, list views are reasonably well behaved, especially when theming is turned off. Combo boxes and toolbars are more temperamental. Check boxes, scroll bars, menus, and message boxes require a lot of custom painting work.

MikeTV · a year ago
Would you mind sending me an email (address in profile)? I'd love to pick your brain about some of the trickier ones I'm running into.
MikeTV commented on Writing GUI apps for Windows is painful   tulach.cc/writing-gui-app... · Posted by u/wild_pointer
ack_complete · a year ago
> Most controls ask their parent what color they should be via a window message.

There are a LARGE number of areas where this is not provided, such as the text color of a disabled control or the checkbox area of a checkbox control. Even for the cases where such customization points were provided, many of them were broken when theming was added in Windows XP and in comctl32.dll version 6 in Vista, which ignores some of them in favor of theme colors or images. Menu colors, for example, are ignored when theming is enabled.

The result is that if you want something approaching a reasonable dark theme with Win32 stock controls, you will often need to resort to full owner-drawing of the controls. This is not a minor task.

MikeTV · a year ago
Do you happen to have links to any good documentation/articles on this topic? I'm working on what amounts to a dark theme for Win32 controls and largely making it up as I go along, relying on tidbits and off-hand mentions from defunct blogs.
MikeTV commented on Treating SQL like code   blog.devgenius.io/why-goo... · Posted by u/sebg
davismwfl · 4 years ago
I've consulted at so many places that just wrote stored procedures/functions and put them in the DB but never put those in source control and managed them like code. Can't tell you how many times they'd split the SQL box onto two separate machines to support different clients and growth and then forget to update one copy of procs on one of the machines causing all sorts of hell.

I found it a lot in small to medium sized business which were transitioning from the couple of people who wrote all their software to a team needing to do things properly and consistently. But I also found it at 50 person dev teams, which was weird and the worst.

I've generally always managed it as code, just easier that way.

MikeTV · 4 years ago
My experience also. This is particularly bad in the SQL Server space, since Microsoft essentially dropped source control integration in SQL Server Management Studio 2016 and later (there's an official workaround[0], but it's not well received).

Most likely they're happy to offload version control to add-ins. There are a few, but most of them are way out of budget for small businesses or small IT departments. Which means version control usually doesn't happen.

This has been such a problem for me with clients that I started a side project[1] to try to help fill the gap. If anything it's shown me that the problem is more widespread than I originally thought.

[0] https://cloudblogs.microsoft.com/sqlserver/2016/11/21/source...

[1] https://www.versionsql.com/

MikeTV commented on Ask HN: Those making $500/month on side projects in 2021 – Show and tell    · Posted by u/folli
MikeTV · 4 years ago
I've been filling a tiny gap in Microsoft tooling with https://www.versionsql.com/

It's something that seemed small and simple to implement, but has filled a not-insignificant portion of nights and weekends for over six years now. Then covid came around and dried up most of my consulting income, so I figured why not really prioritize it and see how far it can go? Still small, but growing nicely now.

Also reluctantly abandoned the flawed "build it and they will come" mentality and started splitting time evenly between development and marketing. This has probably contributed more to the project's recent growth than several thousand hours of dev time. Take heed, o ye ambitious developer-founders! :-) Recommended resources: Product-Led Growth, Developer Marketing Does Not Exist, 80/20 Sales and Marketing, BusinessOfSoftware.org talk videos, Microconf talk videos (on YouTube).

MikeTV commented on On whether changes in bedroom CO2 levels affect sleep quality   gwern.net/zeo/CO2... · Posted by u/pizza
nanomonkey · 7 years ago
Or you can grow spirulina or other microalgae which is much more efficient at converting CO2, and at absorbing the available sunlight. I believe you need about 5 m2 of southern facing window in a bioreactor that is 6 inches deep to convert the 1 kg of CO2 that a person creates. Can't find the citation sadly.
MikeTV · 7 years ago
I'm casually experimenting with this too, to improve AQ in my home office. Do you recall the surface area in the 6-inch-deep bioreactor (or total volume)? The only hard numbers I've found are from the Russian BIOS-1,2,3 experiments, which suggest 18L/person of Chlorella will 75-100% compensate for a person's CO2.

I have 18L of Spirulina, which appears to be having some effect, though not anywhere near a complete offset. Though, my setup is quite sub-optimal, and I've seen articles that suggest Chlorella is a couple times more efficient at biofixation than Spirulina. Continuing to tinker :)

MikeTV commented on Why I’m Worried About Google   slate.com/technology/2018... · Posted by u/DyslexicAtheist
Paul-ish · 7 years ago
That's common in surveys. It's to see if you are paying attention.
MikeTV · 7 years ago
I've noticed that with single-question responses such as Amazon's "why are you returning this" drop-down, and it makes total sense there. A consistently random arrangement means that users picking just the top answer will have no more influence on the overall report than random noise. Makes less sense when available answers are the same for each question, such that the user might have mentally cached them to avoid rereading.

However, n=1. The timing might have been coincidental.

MikeTV commented on Why I’m Worried About Google   slate.com/technology/2018... · Posted by u/DyslexicAtheist
MikeTV · 7 years ago
Today Google popped up a little survey in the corner of my account page, with questions like "I trust Google to keep my data private", "It's easy to find out what data Google has on me", that sort.

Answers were one-click response buttons: Strongly Agree, Agree, Neither Agree nor Disagree, Disagree, Strongly Disagree (top to bottom, in that order).

The first time I clicked "Strongly Disagree", a few questions in, the next question had the order of the answers reversed so that Strongly Agree was on bottom. Submitted an opposite sentiment before realizing what happened.

Strikes me as manipulative, like the survey really isn't so much for discovering my opinion as it is for collecting favorable ones. I wonder who will get the results, and to what end?

MikeTV commented on Don’t keep cell phones next to your body, California Health Department warns   techcrunch.com/2017/12/15... · Posted by u/gdeglin
ilaksh · 8 years ago
Has anyone here looked at these studies? In what way are cell phones supposed to be dangerous? Do the studies say that they raised mice with smart phones in their cage and they got cancer or something?
MikeTV · 8 years ago
This one suggests so: https://www.biorxiv.org/content/biorxiv/early/2016/05/26/055...

Released as a partial report last year; a quick search didn't find if it had been completed yet or not.

MikeTV commented on Ask HN: Do you know any examples of AI-generated fiction?    · Posted by u/norlys
MikeTV · 8 years ago
Check out NaNoGenMo [1], a yearly challenge to write computer-generated novels. Each year gets 100-200 entries (see the GitHub Issues tab) using various techniques. The resource links are treasure troves as well.

Other relevant links I've collected, hoping to do this someday:

- Writing like Engadget [2]

- Story Generator [3]

- MANOWAR Lyrics Generator [4]

- Song lyrics generator [5]

- How Neural Storyteller Works [6]

- A Japanese AI Almost Won a Literary Prize [7]

[1] https://github.com/NaNoGenMo/2017

[2] https://www.engadget.com/2015/12/02/neural-network-journalis...

[3] http://www.seventhsanctum.com/generate.php?Genname=storygen

[4] https://dmatoso.com/manowar-lyrics-generator/

[5] https://www.song-lyrics-generator.org.uk/

[6] https://web.archive.org/web/20170602194354/https://www.somat...

[7] https://motherboard.vice.com/en_us/article/wnxnjn/a-japanese...

MikeTV commented on The Best Monitor for Programming: A Cheap 40" 4K TV   masonsimon.com/2017/11/26... · Posted by u/masonicb00m
cpr · 8 years ago
Funny, I was just pondering this yesterday: whether to "upgrade" to the LG, Phillips or Dell 40+" IPS monitors, or whether to stay with my Samsung 40" TVs (UN40JU6400, 2015 models--later models have annoying misfeatures), which I have in all 3 home offices.

These Samsung TVs, once configured properly (Source > HDMI 1 > Tools, select device type as PC, turn off HDMI UHD Color (which blurs), turn on Dynamic Color as well), are excellent, and at the 28" viewing distance I use, are absolutely crisp (no pixels visible) in Retina mode under macOS.

And I'm using it over HDMI 30Hz with absolutely no flicker, and no (discernible) mouse lag.

The 2015 models don't lose their mind when the Mac goes to sleep, unlike the later models, which require re-configuring each time (the TV "forgets" the HDMI port).

Can't recommend them more, especially since you can get these older models refurbished for $400.

MikeTV · 8 years ago
FWIW I have the 6290 (2016 model) and haven't run into any annoying misfeatures. Crisp and smooth at 60Hz, UHD color mode. Was stuck at 30Hz and perceptibly laggy until I forced it to 4:4:4 in the nVidia control panel.

Everything online tells me the display lag is unacceptable, but I haven't noticed it personally even when FPS gaming. Maybe it's the conditioning from gaming on an underpowered PC growing up :)

u/MikeTV

KarmaCake day134October 8, 2013
About
SQL Server version control plugin: https://www.versionsql.com SQL Server Management Studio dark mode plugin: https://www.sqlshades.com

hn@miketv.us

View Original