|
I'd read it
|
|
|
|
|
I posted it here: P/Invoke Jujitsu: Passing Variable Length Structs[^]
I hope you enjoy it.
I've been doing p/invoke so long and C coding before that that I kind of forget what people don't know when it comes to it. I didn't want to recover beginner P/Invoke stuff but let me know if I didn't explain something very well, when you get a chance to look at it.
Real programmers use butterflies
|
|
|
|
|
honey the codewitch wrote:
I was just teasing earlier, I'd have never made you type that much. What kind of monster do you take me for?
I was thinking about MarshalAs while reading about the MIDIHDR structure definition. Actually lol'd when I got to this part
I thought the article was really interesting. I've done p/invoke and marshalling stuff before but I learned quite a bit here. I had no idea about the StringBuilder trick for example I really enjoyed it!
|
|
|
|
|
That's good to hear. I'm glad you enjoyed it.
And thank you!
Real programmers use butterflies
modified 4-Jul-20 21:13pm.
|
|
|
|
|
I'd certainly read it
"We can't stop here - this is bat country" - Hunter S Thompson - RIP
|
|
|
|
|
P/Invoke Jujitsu: Passing Variable Length Structs[^]
Here you go. If I didn't explain something regarding how to do this technique very well, let me know and I'll append the article. I've been doing P/Invoke so long I may take for granted things people don't know.
Real programmers use butterflies
|
|
|
|
|
Just read it - very cool stuff going on in there - I love this kind of lowish level tech - well done
"We can't stop here - this is bat country" - Hunter S Thompson - RIP
|
|
|
|
|
pkfox wrote: I love this kind of lowish level tech
back in my day (1986 or so) that was called programming.
Seriously though, I'm always glad to know when someone appreciates one of my articles. thanks
Real programmers use butterflies
|
|
|
|
|
I have read it, but another thing is to understand everything
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
I welcome questions. I really wish it was something i could demonstrate with puppets.
Real programmers use butterflies
|
|
|
|
|
honey the codewitch wrote: I welcome questions Good to know
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
I have a background in bit twiddling on 8 bit and 16 bit machines in asm and later C so when I see a struct I automatically visualize its layout in memory. It makes doing p/invoke easy but hard to explain because i take things for granted that other people maybe struggle with.
I think it hurts my writing. So I'm serious, when you get a chance, if the way I'm writing and presenting this material makes it difficult for you or other readers to understand it, you are the most helpful resource around to me and I'd love your help in helping me explain it better, if that makes sense.
And if you're not interested or you don't have time that's okay too.
Real programmers use butterflies
modified 4-Jul-20 18:24pm.
|
|
|
|
|
Have you seen the second sentence of my signature?
I know what you mean.
I'll re-read it and give you a feedback, but it might get some time.
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
okay, fair enough.
Real programmers use butterflies
|
|
|
|
|
First make it work
Then make it work *fast*
Then find out why it doesn't work anymore
Then ask for an actual test budget/timeline for projects.
Then get blown off.
Then ask a coworker to look at the code
Then hack it to work
Then make it work with a new feature
Then make management happy until the customers start calling because it blew things up.
Then ask (again) for an actual test budget/timeline for projects.
Then make it tested.
Then make it work
or something like that.
(cowboy coding in the dotcom boom 1990s trying to serve way more pages than servers were worth in those days and on impossible timelines)
I do like that companies I worked for started realizing that actual development lifecycle and testing was important, though sometimes it took some failed projects.
those were the salad days.
I'm sure the above has many variations, and everyone can come up with one. We all have war stories. It's what makes it fun.
Real programmers use butterflies
|
|
|
|
|
This variant happens a lot:
- Make a super techy proof-of-concept, fast as Elephant!
- Made it. [Not me personally but I saw it happen.]
- They sold it.
- They sold it again and again and...
- Now add a bunch of features!
- Yihaa!
- Why the Elephant is that so hard? Who the Elephant wrote this pile???
"If we don't change direction, we'll end up where we're going"
|
|
|
|
|
That's actually pretty good result, considering it made it through the first sales cycle.
Real programmers use butterflies
|
|
|
|
|
Well I was a bit inaccurate there. It was sold before development and paid on delivery.
"If we don't change direction, we'll end up where we're going"
|
|
|
|
|
You must be with the advanced team.
- Discuss a feature in a meeting.
- Decide it is feasible.
- Manager tells the sales team.
- Submit a budget and time frame for development.
- Sales team sell the feature as completed.
- Manager wants to know why the feature has not been completed.
- Ask management for budget approval.
- Sales manager goes ballistic because he has a pissed off rep and customer.
... it goes on and on and never gets better!
Never underestimate the power of human stupidity -
RAH
I'm old. I know stuff - JSOP
|
|
|
|
|
It's 2000, the peak of the telecom bubble. An all-hands meeting, maybe 250 people in attendance. My boss, the VP of Engineering, is Sri Lankan. Best boss ever. No nonsense, and no tolerance for corporate politics. Calls stuff like that boo-sh*t because Tamil lacks the ll sound in bull. But only in his staff meetings.
He gets up to speak and laments how hard it is to find qualified developers. He describes the people coming in for interviews, saying "We have lots of Joe Blows, but no Joe Blow jobs." Laughter, but probably a lot more than he expected.
Totally innocent. He would have been absolutely mortified if he'd realized the double entendre. Today, some snowflake would have gone whining to HR, and his job might be in jeopardy. Back then, no big deal.
|
|
|
|
|
At COMDEX in 2000 some coworkers (with our CEO) threw burning pizza boxes out the window of their hotel. I had nothing to do with that particular incident of debauchery, but there are others that happened during those couple of weeks that I won't mention outside of vegas. I was however, in the car when said CEO drove the rental car up a curb and blew out the tire, he drove it back on the rim and they gave him an SUV instead. Vegas is full of enablers/ Fun times.
Edited to make SFW. Apologies
Real programmers use butterflies
|
|
|
|
|
Rental cars.
I lost the keys to our rental car in 1986 while glacier trekking on Galdhøpiggen in Norway. I had foolishly put them in my pocket, and they must have fallen out when I sat down somewhere.
So I called the NAF (Norwegian Automobile Assocation) and explained the problem. They would send a guy out first thing Monday morning. It's now Friday at 5pm, and I explained that our flight left Oslo, many hours away, on Sunday.
OK, they'd send someone out in the morning. But this was a little different. He had to break into our car, take apart the steering wheel, and bash the ignition lock into submission. Something that looked like a potentiometer was left hanging from the steering wheel, and the car had to be started with a screwdriver.
When I dropped off the car at the Oslo airport and the check-in lady asked for the keys, I handed her the screwdriver. I told them to charge my credit card for the repairs, but they never did.
|
|
|
|
|
Greg Utas wrote: I told them to charge my credit card for the repairs, but they never did.
Well that was thoughtful.
I'm glad you made it out okay.
Real programmers use butterflies
|
|
|
|
|
First make it.
Then make it work.
|
|
|
|
|
I'm guessing it's still like that in a lot of places.
Except that very few now care about making it fast (or not a memory pig). Our customers used to raise hell if the system's capacity degraded by more than ~2% in a major release, which was naturally the result of their feature demands.
Nowadays, "stateless" programming is all the rage. Good Lord, we would have been out of business yesterday.
|
|
|
|