|
In future I will pack 'em with non-printing characters just to confuse you!
"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!
|
|
|
|
|
|
Hi All, I'm stuck on a call from those that pay and it doesn't look like it's going to end any time soon - I can either post one tomorrow or someone can jump in now - Sorry chaps
"We can't stop here - this is bat country" - Hunter S Thompson - RIP
|
|
|
|
|
OK - I was about to post an "Oi!" for you ...
"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!
|
|
|
|
|
I need [^]
"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!
|
|
|
|
|
|
|
Unless...
Nah, I will not rub it in. Sad enough that you all have to live that way.
I have lived with several Zen masters - all of them were cats.
His last invention was an evil Lasagna. It didn't kill anyone, and it actually tasted pretty good.
|
|
|
|
|
I met him at Freei, a netzero knockoff startup during the dotcom boom, where he was a sort of project manager / creative lead. He was my boss. As an aside, but kind of funny, his first day of a two week vacation was my first day of work. I had no idea what to do with myself. That place was a zoo, but he followed *me* later to another company he got me hired at through his connections and then we had a lot of fun there, wrote a lot of code (well, he directed) went to comdex - i digress
I think one of the reasons we got along is we were both very creative individuals. I've met a lot of software devs (not all of them, but plenty) that are as well, and among them you find some great code.
but too many of them spoil a software house because we're not necessarily as methodical, at least that's my theory.
and maybe we write code too differently, even from one another. I've pained myself to adopt practices at a house a work at, but left to my own devices like I am these days my code tends to be instantly recognizable as mine, if that makes sense. And that's not necessarily a good thing.
Related, but t subject shift
I also have a condition I live with that impacts my short term memory. It's a neurological issue that's otherwise no fun, but eventually realized how much it impacts the *way* I wrote code.
For example, while I'm not averse to say, making a GetCircleRect() , or GetLineDistance() function - and I will - I tend to make functions longer than a lot of people, but i realized, I can't read code very well when they're broken up more, because i forget some of all those little details of the functions and documentation and code discipline can only get you to the 80% mark in that regard.
My peers break up methods way more than I do. Far more.
Also, I don't know how many of you have seen those code metrics tools that rate the "cognitive load" of a method on a developer - the idea is the more "complicated" a method is the higher the load, and these sorts of metrics prefer code to be broken up much more granularly than I am comfortable dealing with. It confuses me to be broken up that much. But the longer functions don't. I think the reason is I make up for one deficiency with another ability - i can deal with cognitive load better maybe than the general population, but my short term memory is shot, and we use that as a scratch pad to help us in all kinds of ways.
This is one way I think it has influenced the way I write software. My code style is identifiable from afar (but then so is the way i walk - according to friends and family )
I am a cockeyed developer
I'm not complaining about it. It's just something I've come to understand about myself, and i think somewhat about development itself and my relationship with it, and I think it's interesting.
I also get mania, and under that spell I've produced things like Parsley (i don't want to plug so search if you're interested) which is a really creative endeavor that i churned out in under a week. So that's not all bad.
Generally I am confident in what I write and I think my code speaks for itself, braceless if statements and all. Still, I don't think there need to be too many of me around, our code would be a zoo.
Real programmers use butterflies
modified 19-Jul-20 20:16pm.
|
|
|
|
|
honey the codewitch wrote: I have a friend that would fashion art out of old TV tubes Vacuum tubes or picture tubes?
I think a picture tube's resemblance to a boob inspired the apropos book title The Glass Teat, a collection of newspaper columns written circa 1970, critiquing the TV shows of the day. Its author was the well-known sci-fi writer Harlan Ellison, who thrived on controversy. There was also a follow-up, The Other Glass Teat. I'm guessing that you'd enjoy them if you can find them.
Yes, I've noticed that you write long methods. On the other hand, I refactor common fragments and other things to the point where I can forget where a virtual function call ends up going if the code hasn't been touched for a while. Then I have to step through it with the debugger or capture a function trace as a reminder.
Software has been written to generate music in the style of various composers. The same could probably be done with software. Now there's a project for you!
|
|
|
|
|
Sorry, CRT tubes - picture tubes.
I'll see if I can find those columns.
Greg Utas wrote: Yes, I've noticed that you write long methods. On the other hand, I refactor common fragments and other things to the point where I can forget where a virtual function call ends up going if the code hasn't been touched for a while. Then I have to step through it with the debugger or capture a function trace as a reminder.
Okay, you get it - now just imagine this. Imagine you just looked at the function 10 minutes ago. And yet you forgot where it ends up. That's what happens to me. Some of it anyway.
I find i can keep track of what my eyes can see, so my code takes up a lot of real-estate on my screen. What I can't see, i can't remember. That's not exactly true, but it's true enough. I can kind of remember, but it gets fuzzy fast. So if i'm dividing up functions in an IDE it means i can't see all the code i need to see at one time to make something work.
I've lived with it all my life, but only made the connection to my code within the last year or so.
ETA: I almost forgot this
Greg Utas wrote: Software has been written to generate music in the style of various composers. The same could probably be done with software. Now there's a project for you!
I've been eyeballing code synthesis for my next code generation projects. This is where you endeavor to generate code that works like a human wrote it.
It's very difficult, but presumably you could plug different styles in if the system were sophisticated enough. It would need to be pretty amazing.
Real programmers use butterflies
|
|
|
|
|
I can see why you prefer long methods. That has to be a bit of a pain alright.
|
|
|
|
|
It is, and it's I think one of the reasons I don't like the hyper factoring that is de-rigueur these days. People make whole classes where a function will do. When the API surface area gets too large I get lost. I eventually learned the .NET base class library but that's 6500+ base classes, and it was lot of work for me. I find i can commit things to "better" memory if i can associate them with something, and if they make sense to me - i think that's typical of people - so i eventually got it, but if you produce a large api, like i said, i typically get lost.
As a consequence I've learned to make my own API surface areas small, and well contained. My MIDI library is an example of that. Less than a dozen classes, not counting midi messages to cover the entire API, and everything tries to be self-consistent.
It makes it so i can use it, and that's the standard i stick to when i build things for others. My code as a consequence, can often hide ridiculous complexity behind simple methods, like my BeginRecording()/EndRecording() or Send() overloads. They handle a lot of different scenarios and create a simple abstraction over them, even at the expense of a really long method. I don't hide huge performance hits behind innocuous things, but i will hide a lot of complexity in a single call. Other people create classes to abstract the whole thing. I just find that adds more headache. I code with the philosophy of using as few classes as I need, but no fewer. Many other developers seem to take almost the opposite approach.
Real programmers use butterflies
|
|
|
|
|
6500+ base classes is why I call .NET bloatware, though in fairness that's from a distance. C# itself doesn't fit in with what I'm trying to do. But if I were building applications, I'd probably have a love-hate relationship with it. Sometimes it would abstract away tons of unnecessary details, and other times I'd want to use lower-level interfaces--assuming that they're even exposed--when it got in the way. As it seemed to do with your recent thread pooling article.
I agree with you: no more classes, and no more public functions, than necessary. Hell, I'll derive from a concrete class if doing so only causes minor kludges. Sometimes this happens in retrospect, when trying to insert a new virtual base class would be a total pain. The main difference in our style would probably be the number of virtual and private functions, but then again we're doing rather different things.
|
|
|
|
|
Greg Utas wrote: Sometimes it would abstract away tons of unnecessary details, and other times I'd want to use lower-level interfaces--assuming that they're even exposed--when it got in the way. As it seemed to do with your recent thread pooling article.
Oh they're exposed. One of the reasons I hated VB6 and only used it to glue my C++ code to a UI (my hate for MFC burns with the fire of 1000 suns) was because everything was opaque. When you needed to go outside of what it offered you were usually out of luck or had to resort to nasty hacks. Okay, the hacks were sometimes fun, like manufacturing a vtbl out of whole cloth to get VB to interface with a lower level com object, but generally you spent a lot of time working against it rather than working with it.
with .NET, everything is exposed. Sure it's wrapped, but you can get to it, and if it's outside of .NET you can P/Invoke to it. You can actually do pointer ops in .NET - it just comes with downsides when doing it on the managed heap. That's why it doesn't offend me coming from C and C++ the way VB6 did.
It in no way attempts to insult the developer's intelligence. The worst case scenario is what you saw with my thread pool project, and eventually, after enough reading, I solved it with less than half a page of code, most of it provided by microsoft in an example.
Real programmers use butterflies
|
|
|
|
|
|
A gc isn't necessarily an insult to developer's intelligence. In fact, google Boehm's collector, which is an implementation of a GC for C++
But why would you ever do that? Simple. Reducing string heap fragmentation in a high performance web server application.
I'm not saying it's appropriate for what you're doing, but
A) it may not be as bad as you think - it certainly performs better than i expected
B) it's even got some advantages over traditional heap management methods in terms of fragmentation.
Real programmers use butterflies
|
|
|
|
|
Not an insult to a developer's intelligence, just makes certain things impossible.
|
|
|
|
|
or at least difficult. I've found very little is impossible with a GC, but a lot of it might be detrimental to its performance. You can pin collected pointers in memory, but it hurts performance.
Real programmers use butterflies
|
|
|
|
|
... it's true what they say about Google[^], you know ...
"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!
|
|
|
|
|
Google, always good for a giggle
|
|
|
|
|
Clipped for my scrapbook.
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
-- 6079 Smith W.
|
|
|
|
|
At least you have something sent. My order from China was stolen in Germany.
The post point it has to pass has over 300+ Google reviews about stolen and missing items since a package passed that location.....
In Word you can only store 2 bytes. That is why I use Writer.
|
|
|
|
|
My last order from China was - in theory - handed to the USPS, which is odd for a delivery heading for the UK.
And the domain I ordered from is no longer registered.
It all looked so real as well ... Hey ho - waiting for a PayPal claim to be reviewed takes far too long!
"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!
|
|
|
|
|
Started badly with the cat being sick at 03:30 ... You gotta clean it up, or you'll step in it when you go for a pee in the dark later ...
He does vomit rather more than I'd like, and one of the suggestions I read about was to raise his food. Apparently it helps it go down, and hopefully stay there. So his bowls got lifted from the floor with the help of an Amazon box, and then his big bowls got replaced with shallower ones, and yesterday I printed a stand for two bowls - his wet food and his dry food.
Today, the bowls get transferred to the stand and he gets bribed to try them. Not a problem, he even lowered his rear end while eating, so hopefully it will all work.
Anyway, when I bought the new bowls they only game in a set of three - and they are far too shallow for a water bowl, so I figured I'd superglue some Neodymium magnets under it (it's a stainless steel bowl) and use it for a pin tray since my last one got borrowed and I haven't seen it since.
Clean the base and the magnets with Isopropyl alcohol apply glue to bowl, drop magnets on carefully. Wait.
Gently push one magnet to see if they are stuck, and ... no ... it goes flying across the bowl, gathers up the other three and vanishes under the freezer.
Of course by the time I get them out, they have successfully glued themselves together just to add insult to injury.
As I said: one of those days.
"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!
|
|
|
|
|