|
My experience is that a LOT of code is not complicated, but made complicated by incompetent developers.
Just an example, I'm working on a (Win)Form where you can enter, save, edit and lookup product data.
I didn't make it, but I'm maintaining the application now.
The first red flag is that the form has database logic, the second is that it has over 1000 lines of code, a third is that the form has quite a few fields.
There's binding in place, but there are still methods like EmptyAddressData which does stuff like PostalCodeTextBox.Text = "" .
All in all, this form is hard to maintain and changing one thing will probably lead to bugs.
If not here then in another part of the application, because naming is illogical, to the part where a name does not reflect what it does, nor what the customer calls it, and the original programmer can't remember what it does either, also changes are the same thing is named differently in another part of the application.
Is it difficult?
Hell no, I used to write such forms by the dozen before breakfast* using some reusable components so that the form code could be less than 100 lines.
Was it made difficult?
Obviously, this "programmer" should've retired long ago
If anything, his programming style prevents you from doing things rather than doing them, despite his line count!
At this point I'm surprised the application works at all.
* Slight exaggeration.
|
|
|
|
|
You're reminding me of how much I hated bizdev.
Real programmers use butterflies
|
|
|
|
|
Size does not matter...
I'm in love with single responsibility and love small, but effective libraries - I can mix them later if I want to create a code monster...
"The only place where Success comes before Work is in the dictionary." Vidal Sassoon, 1928 - 2012
|
|
|
|
|
API footprint does. That's what I mean by size. It directly correlates with learning curve. Sorry i wasn't more clear.
Real programmers use butterflies
|
|
|
|
|
honey the codewitch wrote: I feel like I want to dive into other people's code to see what they have that I don't.
I would try to find open source midi controllers, etc. on github, like the old Nulsoft Winamp and extensions other devs have written for this and winamp.
Other than a hobby project for your personal satisfaction as a developer, I think you are very much reinventing the wheel here. MIDI libraries have been around for a very, very long time. I can't possible understand where yours is much different than the countless midi controllers, etc. on github and the internet in general.
Not trying to be jerky here, just giving my honest thoughts on this.
|
|
|
|
|
I haven't found one I liked in c#
Real programmers use butterflies
|
|
|
|
|
fair enough.
then why don't you research the mostly C/C++ ones out there, and see if there is something that you can "borrow" from and port over to C#...if you are truly interested in seeing what you missed or could do better that another dev has done. Just a thought....
|
|
|
|
|
I'll consider it. What I've seen of the C# stuff isn't great. Wet Dry Midi is cool, but it's a different animal, as it's mostly for high level composition of MIDI scores.
In terms of C#, I'm biased but mine kills it.
using(var dev = MidiDevice.Inputs[0])
{
dev.Open();
Console.Error.WriteLine("Recording started. Press a key to stop.");
dev.StartRecording();
Console.ReadKey();
MidiFile mf = dev.EndRecording();
mf.WriteTo("recorded.mid");
Console.Error.WriteLine("Performance saved to recorded.mid");
}
I just typed that up now. I've never seen it easier to sequence and save score, and despite all that you can get down to the metal with it.
Real programmers use butterflies
|
|
|
|
|
I read your article. You have obviously put a lot of time and effort into this. so congrats.
I do see you have the github link at the top of your article. Awesome. i hope it evolves into something great for you then. I am sure other devs out there that are into MIDI etc. will benefit.
|
|
|
|
|
Thanks. Mostly I like the bit twiddling of the protocol wire format and file format. Interfacing with the windows MIDI drivers is kinda fun but also hell because they only very thinly wrap the drivers to expose them to the application layer. There's no real abstraction from the driver code, is what I'm saying, and the interfaces are C based and haven't been updated since the salad days of Windows 95
Real programmers use butterflies
|
|
|
|
|
honey the codewitch wrote: I feel like I'm missing something big.
I used to think that way, then I realized that most other devs were over-designing, poorly designing, or simply not thinking about the problem and hacking together a solution.
Then I looked back at my own code.
|
|
|
|
|
haha
Real programmers use butterflies
|
|
|
|
|
Ad seen at the top of CP...
What is The Deals Mall? Why does it seem to be shouting at me?
And, most importantly, why is that guy staring at me[^]!?!
|
|
|
|
|
He's trying to read page 17 of "Practical Electronics For Makers", not staring at you.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
|
You'll never know until you click him.
Social Media - A platform that makes it easier for the crazies to find each other.
Everyone is born right handed. Only the strongest overcome it.
Fight for left-handed rights and hand equality.
|
|
|
|
|
ZurdoDev wrote: You'll never know until you click him.
I will never know.
|
|
|
|
|
raddevus wrote: Ad seen at the top of CP...
One word (two?): Pi-Hole.
Bliss.
That's how you do "clean" pages--not by adding extra whitespace everywhere.
Just don't tell Chris.
|
|
|
|
|
I run uBlock, which works just fine - it even tells you how many ads it blocked on a page, so you can decide "greedy b*st*rds" or not. Decent sites get whitelisted. High ad count don't - and probably don't get visited again since they normally care more about ads than content...
CP is whitelisted.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
OriginalGriff wrote: I run uBlock, which works just fine
The tiny Linux VM I have running Pi-Hole is set as the gateway for the machines on my network and it, in turn, then talks to my router. So, every machine on my LAN, including tablets, phones, my Xbox, etc all benefit from it.
|
|
|
|
|
The sound of a hard drive having issues. chkdsk says there's no errors found, but I know the drive is at least 10 years old. Time to migrate to an SSD.
Can anyone recommend a drive migration tool? This is a laptop, so it will have to be done via USB, since there's no additional drive port onboard.
Keep Calm and Carry On
|
|
|
|
|
|
|
I believe some drive I bought in the past came with a version of Acronis. Damned if I could remember who the manufacturer was, but I can at least tell you for sure it's not Seagate.
I don't remember whether CloneZilla has an option to migrate data over onto an existing partition. Obviously if you do a straight copy of a partition, you'll probably end up with a partition that's smaller than the newer drive's capacity. Which means you'll need yet another tool to resize the partition (because to this day Windows still can't do it...)
|
|
|
|
|
I guess that the reason you are looking for a "migration tool" is that you hope to move all the system files, the Registry (assuming that you are in the Windows world) etc. etc. "as is".
Old disks are messy. Lots of crap on them. I choose a different approach: Use the opportunity to clean up. I assume that all your user files are kept separate from the system files and can easily be moved to a large USB stick in a single copy operation (or a small handful). Making an installation DVD or USB stick is straightforward. Install Windows from scratch on the new disk, for a cleaned-up, debris free installation, and copy back your user files from that memory stick.
I have a directory on an external disk with installers for all the software I have obtained, and a utility for reading a list of which installers to run. Those installers requiring user interaction for supplying e.g. license keys are run first; those that can install unattended is done while I take a lunch break.
If you have planned for this way of working (e.g. by keeping your user files separate, maintaining an external disk with all installers, having an up-to-date Windows installation medium available) is a much better solution than carrying all the mess and debris over to the new disk using a migration tool.
|
|
|
|