HN user

sumtechguy

2,560 karma
Posts0
Comments1,718
View on HN
No posts found.

I did something similar in win16/32 at one point. Think we wanted something special with graphics on the button.

We basically had to recreate all of the actions of focus/unfocus/etc. Everything a normal button could do. Now that I have done more stuff I a know for a fact I made my life way harder than it should have been and could have subclassed. But it was a full button recreation. Styling messaging and all. You have to watch for things like what if someone clicks outside of your button but lets go inside the button. What does that mean? All sorts of weird side effects. What if your button has focus and someone starts typing? What if someone clicks outside of your button but holds the button down as they slide across your button? What does that look like?

Would I ever do it again. Probably not. Seriously use the built in ones.

Probably talking about swapping it in from some external datastore. These days you would open the file and dump it into a single buffer and rip across it, and not even really stress about it. Even 256 meg of hard drive. That would have been impressively expensive in the 80s.

Back then you had to chunk it out and fiddle with the offsets. Even then you still would have had to manage loading out the next chunk.

If my memory is right 1MB of memory in the early 90s was like 200-300 per meg. Would have to dig up a computer shopper and look.

Unfortunately not all of them. It depends on the device you are using, and the storage device, and the kernel, and the CRT you are using. The process I was using went from like 20-30 seconds to run to less than a second once I put a cache in front of it. Current implementations may have that cache. I would look first and see what they are doing. At the time I was working with about 6 different CRT's of varying age and quality. Some systems you can turn it on and off per device, or global, or per call depending on flags passed in. Really it comes down to reading the docs (probably right), and testing it out (empirical evnidence). That project I learned to not trust the c runtime libraries. But to verify what they are doing and re-read the docs and make sure I am even using the thing correctly vs what is written in the code and my assumptions.

Also you need to be careful what you read/write. In some cases.

As many examples out there use int/char etc to show how to use the thing. But if you switch to structs that fwrite can totally burn you if you use the sizeof call. As the sizeof a struct can vary between platforms and compilers. Depending on packing. Then endianness can sometimes mess you up. If you are reading/writing for yourself you can get away with a lot. But if you are trying to interop then you have to be wildly careful what you do.

fwrite is another one where people will do one byte at a time (same up to for the windows version). Bash out a loop, use the sizeof for the input to the for loop. copy and paste just doing 1 byte and you can easily end up here. One program I added a cache in front of the thing so it would always write on disk block boundaries and then come back for more. I started off with just packed struct sizes but the perf was just 'ok'. The file block boundary thing really made it fast. Not all OS's have a readahead/write buffer behind that call so perf can vary.

It is honestly such an easy mistake to make. As many of the examples/docs do not really show you why/how to use both of those calls in the way needed. You sort of have to stumble into it and work it out.

Once you see it you know. But until then you do not really notice if it is 'working'.

On some systems/drives if it detects an error that is big enough it will reset the carriage. You can here it reading and rescrubbing over and over. That can cause the carriage motor to overwork and burn out. Not sure of this system does that or not. But that would be my guess.

Now I work mostly with PhDs who were at the top of every academic environment they've ever been in. And yet I can see their thinking skills rapidly declining as well

I noticed this before LLMs became a thing. It was by accident. We had a team of programmers. All decent at what they do. The management said 'hey you want to learn another language we are going to be using it for these upcoming projects'. So we set up a self learned at your own pace class curriculum. Maybe 10-20 hours of school work if you sat and really dug in. Maybe 3 to 4 hours if you breeze thru it and do not care much. We set up weekly check-ins doing about 1 hour a week. Easy. Watch a 20-30 min of vid 20-30 mins of do homework come to check-in and talk about what you learned and help others if needed.

Now this is where I was disappointed. The first 'class' was 40 people. By the last there were 3. Those 3 I noticed always are the ones who dug in. The rest wanted a proctored classroom and someone to tell them what to do.

Actual genuine curiosity is rare I think. We have a lot of people who are decent at what they do. But do not really care about it. IF you do not care you are going to just push the button and get the answer.

Stop Ruining It 2 months ago

Start simple add the rest later when you needed it. How will you know you need it later? At 3AM. If it makes you feel better add a comment what will be needed when it breaks.

I see over and over wildly overdone code. When all I really wanted was some simple if conditions and a couple of loops. But that doesnt scale to XYZ per ns. Does it need to?

Boring wins almost every time.

Yeah that probably should just be an option. Basically the default is to least mangle the zip file. Where the most extreme is turned on by flags. One of those could be 'remove empty folders'.

Yeah I was thinking that. Also at some point you will be switching motherboards every other cpu update just due to the socket changes between generations.

Heh, not sure why but it makes me wonder if you could 'Ship of Theseus' something like that into a modern day desktop. By going thru the different eras of DIY compute.

That can happen many times during a buyout. Some company buys a thing. The problem then is ownership of the thing. Who in the new company is going to own the 'make sure it stays good' problem. Sometimes with a buy out the people who were doing that may even stay at the company. But it is a matter of motivation. MS has a real serious problem. You can see the gaps where they have glued together at least 10 companies together and called it microsoft. They have a huge reputational risk issue. Where something breaking in the xbox div can have a negative impact on the tools division. Also the other way around. They lack focus on many items. They have needed a 'service pack 2' stop the presses moment and fix this mount everest of tech debt.

Sometimes also the project is just 'done'. I many years ago made a windows screensaver (never released to anyone else). Just so I could have a '2001' screen saver. Basically in the background of the movie was all these screens flashing just weird status stuff. It was a cool aesthetic I kinda liked. Spent many weeks getting it to flash 'just right' and have the right animations for the right feel. Then LCD screens basically killed any need to have a screen saver. As basically instant on/off meant there was no reason to have the monitor running all the time. So the project was done.

Think someone got the bill and worked out their burn rate and pushed the big stop button.

Remember when you are renting other peoples computers they can and will change the terms for their benefit. They own it. You dont. You rent it.

IoT was an absolutely terrible fit for the home space. My parents have light switches in their house installed in the 1940s. They still work just as good. Getting something from the IoT of home automation to last like that is very difficult. Yet it seems to be the first model everyone reaches for when talking about it. If they had to replace the switches it would not cost too much to do either.

IoT really comes into its own space though when you pair it up with something that is a real pain to get to. Think somewhere you have to have a crainlift and a 4 hour drive just to touch the 20 year old computer something is hooked up to. Or basically anywhere that takes hours to get to. The space my company typically targeted was high rise air con companies. Or companies where the customer would service out any sort of PLC work to a 3rd party. At that point the savings of having to roll a guy out there vs looking on a computer has the thing pay for itself in 1-2 trips. Also the ability to show up on site with the correct parts. That alone was a huge savings.

IoT's big issues is you have to beat many things that are already dead simple to do.

Had one project where for some reason one of the devs wanted to access the messages before it got translated. The reasons are lost to time. You technically could create other types of application that is not CLI or 'windows'. But then you are own your own making the queues or console items. Think they were typically used for device drivers or background service manager tasks.

https://learn.microsoft.com/en-us/cpp/build/reference/subsys...

Pretty sure it just changes out what the default function that is called before winmain. So you probably could just switch out the first function called (dont remember the cli option for that).

Most of the time you just picked the right type at project creation so it would feed correctly into the project solution which would set the right flags on build. But technically you could pick the most basic one and do it all yourself.

It was more of you had to know where to grab control. It was not always clear.

With some of them it was dead easy and you can do it on window creation.

Others you had to hook it out by playing with the window params (SetWindowLong) and getting the underlying control and then changing it.

Some controls had their own bespoke way where you would send messages to the control then it would take care of it.

Some you would have to iterate over the control list that window controlled and change it.

In some cases it was just such a pain you were better off making your own custom control window that was just a mashup of other controls that you could control.

It was one part experimentation and one part reading the docs (if the control had it). Now if it was a built in windows control you were playing with. You had to take on the risk on windows version update the customization you did would break if you did non documented things.

This isn't actually true though. You can delegate to the default window proc, and only customise what you want.

Yeah that was my memory of doing this stuff. You basically just added what you wanted to the case statement (or other hooks depending on your framework). Then dump the rest onto the default proc. The default 'wizards' usually made the standard petzold structure for you and you didnt even really have to think much about it. Now if you were doing everything by yourself just make sure you read the docs and make sure you call the default in the right cases.

I saw a few years ago one group buying spools of fiber just to 'slow down' the trades. As they were submitting them to different datacenters across the country. They wanted everything to show up at the exact same time so no one would front run their trades on different datacenters. They are willing spend millions on HW if it gives them an edge in the market. They would buy bespoke boards that could hold 16x the RAM if it gave them a 50ns edge.

I can not think of any reason they would not want to do it.

However, I do seem at least 2 downsides to this method.

Number one it is at least 2x the memory. That has for a decently long time been a large cost of a computer. But I could see some people saying 'whatever buy 8x'.

The second is data coherency. In a read only env this would work very nicely. In a write env this would be 2x the writes and you are going to have to wait for them to all work or somehow mark them as not ready on the next read group. Now it would be OK if the read of that page was some period of time after the write. But a different place where things could stall out.

Really liked her vid. She explained it very nicely. She exudes that sense of joy I used to have about this field.

Interesting. I personally aggressively prune open pages. If I have too much open I get off task and wander into whatever random thing pops up. Anything that needs long term storage I bookmark it in a folder.

Using the session manager that is one I used to use. But backed away from. I use a lot of tools to keep me on task and not wander off into random things.

For me it is about attention and focus. You seem to have a very different pattern than what I use. ctrl-w and alt-left arrow are my buddies.

Honest question do you really use all of those tabs? As a small handful of tabs user I use the bookmark feature to hold things I want to keep for later. ctrl-d and it is in the list. Even then 99% of the time I open it again and go 'why did I keep this'. I get it that it is your workflow. Just sort of curious why you would consider that a 'power user' thing? Would not saving them to the bookmark list be more of 'power user' sort of thing to do?

totally.

MS ended up where it was at because there was basically NO upgrade path between the few different GUI frameworks they had. They broke the whole thing in 2002 when they decided .NET was the way.

You had to basically retool your whole GUI for whatever they were pushing at the time. Then they basically abandoned win32 GUI items and put them in mothballs. Then change their minds every other year.

No sane person is going to pick that model of building an application. So the applications kinda stagnated at whatever GUI level they came into being with. No one wanted to touch it. If I am doing that why am I sticking with windows? I can get the same terrible effect on the web/mobile and have a better reach.

Even their flagship application windows is all over the place. If you click on the right thing you can get GUI's that date back to windows95. Or maybe you might get a whitespaced out latest design. It is all over the place. It has been 10 years at this point. They should have that dialed in years ago.

I do not think Google will be able to pay attention long enough to have a stable GUI. Apple maybe. As for MS you can see it from the outside there are several different competing groups all failing at it.

MS needs another 'service pack 2' moment. Where they focus on cleaning up the mess they have. Clean up the GUI. Fix the speed items. Fixup the out of the box experience (should not take 4gig of used memory just to start up). Clean up the mountain of weird bug quirks.

Usenet Archives 4 months ago

spam murdered it.

It got ridiculous pretty quickly. The overhead to spam was so low as the protocol was designed to be low friction for posting. The system then took care of carrying the payload everywhere in a reasonable time. People fought back with filters and kill lists. But was not really enough.

Once the ISPs decided they did not want the added cost of running the servers usenet tanked pretty quick. Still alive here and there. Not even close to what it could have been or even was.

Surprised someone has not made a mastadon to usenet transfer protocol. It almost fits both projects goals.

Each version up thru Win8 had a style guide. If you wanted the windows sticker on your box you made it consistent. Why would you want that sticker? If you did not have it it was much harder to get floor space at many of the big box stores.

It was at win8 where everyone just noped out and just started doing whatever they wanted. XP/2000 was the last era where anyone really cared.