Donate to Remove ads

Got a credit card? use our Credit Card & Finance Calculators

Thanks to johnstevens77,Bhoddhisatva,scotia,Anonymous,Cornytiv34, for Donating to support the site

Source loss

A friendly ear
csearle
Lemon Quarter
Posts: 4764
Joined: November 4th, 2016, 2:24 pm
Has thanked: 4814 times
Been thanked: 2083 times

Source loss

#372421

Postby csearle » January 2nd, 2021, 5:32 pm

Just got back to where I was at 1500 this afternoon. At that time I pushed the compile, link, and go button on my C++ compiler and instead of much happening it just hiccuped and closed some of my windows. Turns out that it just reverted to 1130 versions of four of my source files. I had been so engrossed that I'd totally forgotten to periodically save it.

There were no temporary files or anything (save for the ones it used to get back to 1130). Even had I had my back-up software doing an incremental back-up every 10s, like I used to do, it wouldn't have helped in this case. Just found an option called "Autospeichern" nested deep within. I've turned it on now (stable-door, horse), although no mention of how often it might do it.

At 1500 no amount of comforting would have helped. Now that it's all re-programmed I just need someone to tell me how stupid I am but that we all do this kind of stuff from time to time.

Chris

bungeejumper
Lemon Half
Posts: 8064
Joined: November 8th, 2016, 2:30 pm
Has thanked: 2846 times
Been thanked: 3939 times

Re: Source loss

#372430

Postby bungeejumper » January 2nd, 2021, 5:54 pm

OK, you're stupid. Feel better now? :)

The bright side? Having had to do it all over again will have brought out some better ideas in your mind. Version two is sure to be tighter, better thought through and generally more elegant than version one. And I bet it only took you half the time to do?

I write for a living - or rather, I used to - and the pain of losing a first effort, for whatever reason, is (nearly) always outweighed by the eventual satisfaction of getting it better the next time round. Doesn't work so well with music, but fortunately we're not talking about that situation here. Glad you found the Autospeicher. Gesundheit!

BJ

kiloran
Lemon Quarter
Posts: 4092
Joined: November 4th, 2016, 9:24 am
Has thanked: 3234 times
Been thanked: 2827 times

Re: Source loss

#372435

Postby kiloran » January 2nd, 2021, 6:17 pm

csearle wrote:At 1500 no amount of comforting would have helped.
Chris

Rubbish! Look at all of your options.... Cahors, Frontonnais, Malbec, Syrah, Ardbeg, Laphroiag, Springbank, etc etc etc

--kiloran

csearle
Lemon Quarter
Posts: 4764
Joined: November 4th, 2016, 2:24 pm
Has thanked: 4814 times
Been thanked: 2083 times

Re: Source loss

#372468

Postby csearle » January 2nd, 2021, 8:44 pm

bungeejumper wrote:The bright side? Having had to do it all over again will have brought out some better ideas in your mind. Version two is sure to be tighter, better thought through and generally more elegant than version one. And I bet it only took you half the time to do?
Yes, it was quicker to re-program and several parts ended up somewhat neater. This invariably used to happen when I programmed for a living. I'd just not had that particular pain for a decade or so. :)

Chris

servodude
Lemon Half
Posts: 8271
Joined: November 8th, 2016, 5:56 am
Has thanked: 4435 times
Been thanked: 3564 times

Re: Source loss

#372538

Postby servodude » January 3rd, 2021, 6:38 am

csearle wrote:
bungeejumper wrote:The bright side? Having had to do it all over again will have brought out some better ideas in your mind. Version two is sure to be tighter, better thought through and generally more elegant than version one. And I bet it only took you half the time to do?
Yes, it was quicker to re-program and several parts ended up somewhat neater. This invariably used to happen when I programmed for a living. I'd just not had that particular pain for a decade or so. :)

Chris


What you've written is always true in my experience; having done the thinking first time around, including the pruned branches of whimsy and logic journeys, recoding takes little time - as if you're starting with a known path

But... GIT
- use it
- even if you only ever commit locally
- commit often
- never suffer again

(Also see IDEs that save on build, and track local changes)

- sd

johnhemming
Lemon Quarter
Posts: 3858
Joined: November 8th, 2016, 7:13 pm
Has thanked: 9 times
Been thanked: 609 times

Re: Source loss

#372561

Postby johnhemming » January 3rd, 2021, 9:38 am

servodude wrote:(Also see IDEs that save on build, and track local changes)

I think forcing save on build is good. I use eclipse for java and I think they also do c and c++. They force save on build and track changes for java. I presume c c++ is the same.

https://www.eclipse.org/downloads/packa ... developers

My big fear is my 8 year old son playing on my system or the cats walking on the keyboard when the editor is open. Hopefully, however, whatever happened would create compiler errors and be easy to notice having happened.

servodude
Lemon Half
Posts: 8271
Joined: November 8th, 2016, 5:56 am
Has thanked: 4435 times
Been thanked: 3564 times

Re: Source loss

#372564

Postby servodude » January 3rd, 2021, 9:52 am

johnhemming wrote:
servodude wrote:(Also see IDEs that save on build, and track local changes)

I think forcing save on build is good. I use eclipse for java and I think they also do c and c++. They force save on build and track changes for java. I presume c c++ is the same.

https://www.eclipse.org/downloads/packa ... developers

My big fear is my 8 year old son playing on my system or the cats walking on the keyboard when the editor is open. Hopefully, however, whatever happened would create compiler errors and be easy to notice having happened.


I must confess to being a fan of eclipse despite there being "better" IDEs these days
- my muscle memory is tuned to it ;)
- and it does the local history thing very well

It's skinned quite well by TI for their DSP control applications

I've also managed get it doing simultaneous debugging of Java and C: both via remote targets (try that in intelliJ)
- there's little it can't do with the right plugins (and possibly an environment set before you launch it)

- still works like the memory fiend that is Java though ;)

-sd

johnhemming
Lemon Quarter
Posts: 3858
Joined: November 8th, 2016, 7:13 pm
Has thanked: 9 times
Been thanked: 609 times

Re: Source loss

#372568

Postby johnhemming » January 3rd, 2021, 10:04 am

servodude wrote:- still works like the memory fiend that is Java though ;)

Not such a problem with memory being so cheap. My main production server has now been up since before Xmas. It used to chew through memory and have to reboot, but I built some soft and weak references into some of the cacheing. Now if it is a bit short of memory it swaps weak references for soft references in the cacheing map(s) and the JVM sorts out the memory if needs be.

I have also been impressed by Eclipse in that it has enabled me to debug sound streams and speech recognition software with breakpoints in the code that does mixing etc so I can tinker with parameters and then hear what it sounds like. It takes a couple of seconds to get back into phase. I do, however, have a lot of memory on my development machine.

servodude
Lemon Half
Posts: 8271
Joined: November 8th, 2016, 5:56 am
Has thanked: 4435 times
Been thanked: 3564 times

Re: Source loss

#372585

Postby servodude » January 3rd, 2021, 10:35 am

johnhemming wrote:
servodude wrote:- still works like the memory fiend that is Java though ;)

Not such a problem with memory being so cheap. My main production server has now been up since before Xmas. It used to chew through memory and have to reboot, but I built some soft and weak references into some of the cacheing. Now if it is a bit short of memory it swaps weak references for soft references in the cacheing map(s) and the JVM sorts out the memory if needs be.

I have also been impressed by Eclipse in that it has enabled me to debug sound streams and speech recognition software with breakpoints in the code that does mixing etc so I can tinker with parameters and then hear what it sounds like. It takes a couple of seconds to get back into phase. I do, however, have a lot of memory on my development machine.


No question about the fact that memory is cheap these days (in some contexts!)
- most Java code I've seen through is still coded as if it is never a concern (which is why I'm picky as when interviewing them(
- but that's what you get when you abstract the facts of the machine that lie below

I think this will change when they're focusing on deployment as lambda or equivalent apps (as is becoming the trend) - and effectively paying per cycle/resource

Still Eclipse for me beats the IDEs and dev kits I was paying 20k GBP for 15 years ago ;)

-sd

johnhemming
Lemon Quarter
Posts: 3858
Joined: November 8th, 2016, 7:13 pm
Has thanked: 9 times
Been thanked: 609 times

Re: Source loss

#372609

Postby johnhemming » January 3rd, 2021, 11:40 am

servodude wrote:Still Eclipse for me beats the IDEs and dev kits I was paying 20k GBP for 15 years ago ;)

I started coding commercially in 1981 on RPG. At times we had to prepare code for someone else to type and then see what came out.

I set up my own business in 1983 and moved out of doing a lot of the coding as I later took on staff. However, it was nice to even have systems that you could breakpoints in. The idea that you could inspect variables and change them or even change the code and reload the class (we didn't have classes in RPG II) was still a long way away.

csearle
Lemon Quarter
Posts: 4764
Joined: November 4th, 2016, 2:24 pm
Has thanked: 4814 times
Been thanked: 2083 times

Re: Source loss

#372630

Postby csearle » January 3rd, 2021, 12:09 pm

servodude wrote:...
Happily that well-hidden Autospeichern setting on my ancient IDE (Borland C++ Builder) has come up trumps, so it now saves on build. Started using git for my app projects last year but this is the first project* for my Windows desktop computer since then and I didn't think about it. Good idea though, thanks. I'll set it up.

Chris
* A UI for entering electrical installation information and generating a pdf of the populated certificate.


Return to “Comfort Cafe”

Who is online

Users browsing this forum: No registered users and 11 guests