HackerTrans
TopNewTrendsCommentsPastAskShowJobs

sumtechguy

2,560 karmajoined il y a 6 ans

comments

sumtechguy
·il y a 4 jours·discuss
and sometimes you can not do that. if it is some sort of historical thing.
sumtechguy
·il y a 18 jours·discuss
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.
sumtechguy
·il y a 19 jours·discuss
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.
sumtechguy
·il y a 25 jours·discuss
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'.
sumtechguy
·le mois dernier·discuss
There is one game called 'hack n slash' on steam. You manipulate the 'global vars' to win the game. There is even one point where the game has you open up its data files and change things. Interesting mechanic.
sumtechguy
·le mois dernier·discuss
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.
sumtechguy
·le mois dernier·discuss
> 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.
sumtechguy
·le mois dernier·discuss
those story points do not earn themselves!
sumtechguy
·le mois dernier·discuss
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.
sumtechguy
·il y a 2 mois·discuss
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'.
sumtechguy
·il y a 2 mois·discuss
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.
sumtechguy
·il y a 2 mois·discuss
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.
sumtechguy
·il y a 2 mois·discuss
I want to see the outtake lines they didnt use. Roddy Piper had tons of one liners he would use for wrestling.
sumtechguy
·il y a 2 mois·discuss
I wanted an accountant I got a poet.
sumtechguy
·il y a 2 mois·discuss
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.
sumtechguy
·il y a 3 mois·discuss
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.
sumtechguy
·il y a 3 mois·discuss
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.
sumtechguy
·il y a 3 mois·discuss
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.
sumtechguy
·il y a 3 mois·discuss
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.
sumtechguy
·il y a 3 mois·discuss
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.