|
PIEBALDconsult wrote: I wish there were a way to do that for C# in VS. Doesn't VS offer some sorta doxygen style comments? That's a great idea and I do the same in Node with jsdoc style comments. For VSCode at least, it has the bonus of also showing the example uses or edge cases via intellisense too.
Jeremy Falcon
|
|
|
|
|
I think it's things which get executed at compile time, but I would want to have the ability to execute ad-hoc tests whenever I like.
|
|
|
|
|
I really like using unit tests especially when I am working on some new algorithms. I can test instantly without firing up the GUI and entering the data manually. Helps me find the inverted logic and poorly managed edge cases (hey, sometimes I rush it a bit when I get excited!)
Other people's unit tests have saved my bacon many times. "Well, this is an obvious bug that needs fixing" followed by failed unit tests has led me to learn a lot more about some seemingly innocuous code. I usually add comments so future devs don't make the same mistake, btw.
|
|
|
|
|
Unit testing: very much yay.
I've been doing unit testing steadily since about 1999. I have my own simple unit test driver. Tests are static member functions. It can all be statically linked with an executable. No tests enabled equals no overhead in size or time. The two places I've worked that did unit testing also had the highest code quality of the places I've worked. I've used a couple of open source frameworks for unit tests, but they seemed unnecessarily complicated to me, and it's annoying to have to separately compile test executables. Writing unit tests helps me wring out my designs and of course avoid regressions when I change things (which happens all the time).
|
|
|
|
|
SeattleC++ wrote: I've been doing unit testing steadily since about 1999. Noice. For me it's only been a few years, but the more I do it and the better I get at it, the less of a chance of ever turning back ya know.
SeattleC++ wrote: and it's annoying to have to separately compile test executables Oh yeah, that is one one of the caveats I faced in a C project once. The way I handled it was to have my overall build command just compile both. Probably harder to get away with that for C++, so cool idea.
Jeremy Falcon
|
|
|
|
|
Had to implement a globally unique ID generator that would work in distributed/disconnected system for a project in TS today. Doesn't warrant an article (I think??), so here it is if anyone wants it. Much like YouTube IDs, etc. the result is in base62 to keep it as short as possible. Runs fast enough to generate 100,000 IDs in 340ms in a WSL environment.
Big ol' edit: Made this a tip/trick. Nothing to see here now. La la la.
Jeremy Falcon
modified 19-Apr-24 21:33pm.
|
|
|
|
|
Perhaps Tip/Trick or Weird and Wonderful material?
"the debugger doesn't tell me anything because this code compiles just fine" - random QA comment
"Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst
"I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle
|
|
|
|
|
jeron1 wrote: Perhaps Tip/Trick or Weird and Wonderful material? Oh crap, I'm gonna seem like an old fart now... what's the tip/trick thing?
Jeremy Falcon
|
|
|
|
|
Ooooooooh, wait. I see it now. Um, it's been a while since I posted a new article, as you can tell. Thanks.
Jeremy Falcon
|
|
|
|
|
"the debugger doesn't tell me anything because this code compiles just fine" - random QA comment
"Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst
"I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle
|
|
|
|
|
Wordle 1,036 4/6*
⬛⬛⬛⬛⬛
⬛⬛🟨⬛⬛
⬛🟩🟨🟨🟩
🟩🟩🟩🟩🟩
|
|
|
|
|
Wordle 1,036 3/6
⬜🟨🟨⬜🟨
🟨⬜🟩🟨⬜
🟩🟩🟩🟩🟩
|
|
|
|
|
Wordle 1,036 3/6
⬛⬛⬛🟨⬛
🟨🟩⬛🟩🟩
🟩🟩🟩🟩🟩
|
|
|
|
|
🟨⬜⬜⬜⬜
⬜🟨⬜🟨⬜
⬜🟩🟨🟨⬜
🟩🟩🟩🟩🟩
In a closed society where everybody's guilty, the only crime is getting caught. In a world of thieves, the only final sin is stupidity. - Hunter S Thompson - RIP
|
|
|
|
|
Wordle 1,036 4/6*
⬜⬜⬜⬜⬜
⬜🟩⬜🟩🟨
🟨🟩⬜🟩🟩
🟩🟩🟩🟩🟩
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Wordle 1,036 4/6
⬜🟩🟨⬜⬜
🟨⬜⬜⬜⬜
⬜🟨⬜⬜⬜
🟩🟩🟩🟩🟩
|
|
|
|
|
Wordle 1,036 3/6
⬜🟨⬜⬜⬜
🟨⬜⬜⬜⬜
🟩🟩🟩🟩🟩
|
|
|
|
|
Wordle 1,036 5/6
⬛⬛⬛⬛⬛
⬛⬛🟨⬛⬛
⬛🟨🟨⬛⬛
⬛🟨🟨🟩🟩
🟩🟩🟩🟩🟩
Ok, I have had my coffee, so you can all come out now!
|
|
|
|
|
Wordle 1,036 5/6
⬛⬛⬛⬛⬛
⬛🟨⬛⬛⬛
🟩🟩⬛⬛⬛
🟩🟩🟩⬛⬛
🟩🟩🟩🟩🟩
Jeremy Falcon
|
|
|
|
|
Of course it does...
Low-code tools boost developer productivity[^]
"Over 90 percent of respondents to a new survey say that low-code tools have boosted developer productivity in their organizations. 43.5 percent of developers are saving up to 50 percent of their time when they use low-code tools on a project."
I keeping thinking one of these days I will actually find an organization that actually measures developer productivity. Or devops. Or IT. Or DBAs. Or CEOs.
Now Sales ... those guys have it down ... 'how many contracts did you sign last month?'
But back to the article ...
""Low-code software has real value in democratizing software development to include non-developers," says Jason Beres, senior VP of developer tools at Infragistics, and creator of App Builder software."
Any one want to guess what Infragistics sells? Come on - I dare you.
The 'story' is based on a study created by ... bet you can't guess!
"The full report is available from the App Builder site."
|
|
|
|
|
I mean, I hear what you're saying.
But allow me to play devil's advocate in defense of low code tools at least.
Good ones are gold. SynthMaker (now FlowStone) is absolutely amazing. It was used to build Audio VSTs but is now an entire industrial automation creation tool. It's really well designed, and doesn't limit you strictly to its framework, which is extensible.
As far as productivity, I'd be interested if someone commissioned research on studying HOW to measure developer productivity effectively. That would be a tall order because you have to define things like effectively, but if one could pull it off I'd be rapt.
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
And my IoT UI/User Experience library here:
https://honeythecodewitch.com/uix
|
|
|
|
|
the real story about "measuring" developer productivity - if anyone ever really truly wanted to know, would tag two things. The people measuring cannot define any reasonable sort of measurement, and two, most development is brand new - almost an art form. Rarely are developers given a tangible target or description of a target.
years ago, I worked in a group (actually still do but 1/2 are gone now) developers. The development project started with the ubiquitous phrase - "how long?" to which the developers asked, "what is it you want?" This got an eye roll from product development, management and sales. After falling prey to guilt, the developers threw out estimates where upon they were told, "no, that's too long, it has to be ready for the xxx3 trade show."
After the other people's delivery target went zooming by (after a lot of free OT), the entire engineering group were held accountable for missing "their" estimate. 6 months later, we had a number of cubicles open....
So, what's the benefit of "low-code" tools? It's called RAD, tosses something fast in front of the possible customer to figure out what the customer really wants.
Charlie Gilley
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
Has never been more appropriate.
|
|
|
|
|
in democratizing software development to include non-developer
is sheer marketing BS. This is a VP in development? I've lived enough of my life watching a democracy destroy perfectly good code because the person in charge would not wave the BS flag. what drivel.
Charlie Gilley
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
Has never been more appropriate.
|
|
|
|
|
Update: I have since fixed the terrible bug!
I'm posting this because when I rant about these things to you folks I tend to come up with a solution, and I've been at this since last night. Skip it if you'd rather not be used like that. It's not a programming question, though I will describe the problem. There's not really code as such.
[\r\n]* (zero or more carriage returns or line feeds) yields a proper set with two transitions
[^\r\n]* (zero or more of anything but carriage returns or line feeds) matches any characters (incorrect). The set has one range with all unicode code points in it, and when you invert the set and then minimize the result it will actually crash.
[^\n\r]* (functionally same as above) but works properly, yielding a set of all except carriage return or line feed. This despite the sets ostensibly being sorted.
I thought I narrowed it down to a normalization routine I have that takes overlapping ranges and merges them. That still might be part of the problem. However, I removed the call to the normalization routine and it still fails my test, so something else is at fault further downstream.
One of the issues is this is in live code - with deployed nuget packages and codeproject articles, and I only just discovered it. So there's some pressure on me to fix it, albeit self imposed.
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
And my IoT UI/User Experience library here:
https://honeythecodewitch.com/uix
modified 20-Apr-24 9:59am.
|
|
|
|
|
Sometimes over-engineered code breaks your neck. And then I can't help but laugh maliciously.
|
|
|
|