|
nielsm posted:Whatever you use for printing might very well have some kind of synchronisation to avoid multiple prints stepping over each other. Causing your threads to sort-of synchronise at your printing points. One time working on a project in college I managed to get Visual Studio to throw a syntax error in the middle of a comment. I deleted the comment, and the error went away. Re-added the comment, error came back. Said "gently caress it" and got drunk. Don't remember what came of it.
|
# ? Aug 10, 2013 03:00 |
|
|
# ? May 28, 2024 05:48 |
|
Time for you to learn about trigraphs and digraphs!
|
# ? Aug 10, 2013 03:12 |
|
Blue Footed Booby posted:One time working on a project in college I managed to get Visual Studio to throw a syntax error in the middle of a comment. I deleted the comment, and the error went away. Re-added the comment, error came back. Said "gently caress it" and got drunk. Don't remember what came of it. You had some antivirus or something running and it hosed with the modification dates on your project's idb files. VS loves to do stupid crap like this. The project I'm working on currently has a weird postbuild step that makes vs flip the gently caress out and randomly not rebuild files unless the output produced by the postbuild is missing entirely.
|
# ? Aug 10, 2013 10:43 |
|
About debug print: maybe if you don't print the compiler optimizes out some variables/expressions?
|
# ? Aug 10, 2013 16:15 |
|
At my job we call this Heisenberg-compliant. The code works when not being observed, but when observed it breaks. You can never see it and have it work at the same time.
|
# ? Aug 10, 2013 17:16 |
|
It's already been called a 'Heisenbug' for about 28 years, I'm afraid.
|
# ? Aug 10, 2013 19:38 |
|
Tesseraction posted:It's already been called a 'Heisenbug' for about 28 years, I'm afraid. That's the opposite of what he described!
|
# ? Aug 10, 2013 21:29 |
|
1337JiveTurkey posted:var ┻━┻ = new WhateverException() Please tell me that this is a thing that can actually be some in some language.
|
# ? Aug 11, 2013 06:08 |
|
Volmarias posted:Please tell me that this is a thing that can actually be some in some language. java script: quote:゚ω゚ノ= /`m´)ノ ~┻━┻ //*´∇`*/ ['_']; o=(゚ー゚) =_=3; c=(゚Θ゚) =(゚ー゚)-(゚ー゚); (゚Д゚) =(゚Θ゚)= (o^_^o)/ (o^_^o);(゚Д゚)={゚Θ゚: '_' ,゚ω゚ノ : ((゚ω゚ノ==3) +'_') [゚Θ゚] ,゚ー゚ノ :(゚ω゚ノ+ '_')[o^_^o -(゚Θ゚)] ,゚Д゚ノ:((゚ー゚==3) +'_')[゚ー゚] }; (゚Д゚) [゚Θ゚] =((゚ω゚ノ==3) +'_') [c^_^o];(゚Д゚) ['c'] = ((゚Д゚)+'_') [ (゚ー゚)+(゚ー゚)-(゚Θ゚) ];(゚Д゚) ['o'] = ((゚Д゚)+'_') [゚Θ゚];(゚o゚)=(゚Д゚) ['c']+(゚Д゚) ['o']+(゚ω゚ノ +'_')[゚Θ゚]+ ((゚ω゚ノ==3) +'_') [゚ー゚] + ((゚Д゚) +'_') [(゚ー゚)+(゚ー゚)]+ ((゚ー゚==3) +'_') [゚Θ゚]+((゚ー゚==3) +'_') [(゚ー゚) - (゚Θ゚)]+(゚Д゚) ['c']+((゚Д゚)+'_') [(゚ー゚)+(゚ー゚)]+ (゚Д゚) ['o']+((゚ー゚==3) +'_') [゚Θ゚];(゚Д゚) ['_'] =(o^_^o) [゚o゚] [゚o゚];(゚ε゚)=((゚ー゚==3) +'_') [゚Θ゚]+ (゚Д゚) .゚Д゚ノ+((゚Д゚)+'_') [(゚ー゚) + (゚ー゚)]+((゚ー゚==3) +'_') [o^_^o -゚Θ゚]+((゚ー゚==3) +'_') [゚Θ゚]+ (゚ω゚ノ +'_') [゚Θ゚]; (゚ー゚)+=(゚Θ゚); (゚Д゚)[゚ε゚]='\\'; (゚Д゚).゚Θ゚ノ=(゚Д゚+ ゚ー゚)[o^_^o -(゚Θ゚)];(o゚ー゚o)=(゚ω゚ノ +'_')[c^_^o];(゚Д゚) [゚o゚]='\"';(゚Д゚) ['_'] ( (゚Д゚) ['_'] (゚ε゚+(゚Д゚)[゚o゚]+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ (゚ー゚)+ (゚Θ゚)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((゚ー゚) + (゚Θ゚))+ (゚ー゚)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ (゚ー゚)+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((o^_^o) +(o^_^o))+ ((o^_^o) - (゚Θ゚))+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((o^_^o) +(o^_^o))+ (゚ー゚)+ (゚Д゚)[゚ε゚]+((゚ー゚) + (゚Θ゚))+ (c^_^o)+ (゚Д゚)[゚ε゚]+(゚ー゚)+ ((o^_^o) - (゚Θ゚))+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ (゚ー゚)+ ((o^_^o) - (゚Θ゚))+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((o^_^o) +(o^_^o))+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((o^_^o) +(o^_^o))+ (゚ー゚)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((o^_^o) +(o^_^o))+ (゚ー゚)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((o^_^o) +(o^_^o))+ (o^_^o)+ (゚Д゚)[゚ε゚]+(゚ー゚)+ ((o^_^o) - (゚Θ゚))+ (゚Д゚)[゚ε゚]+((゚ー゚) + (゚Θ゚))+ (゚Θ゚)+ (゚Д゚)[゚o゚]) (゚Θ゚)) ('_');
|
# ? Aug 11, 2013 08:58 |
|
Somebody was asking me about whether there was a way to define constants in Javascript. God help me, there is. This is the example I ended up giving them, along with a warning not to do it:code:
|
# ? Aug 11, 2013 15:33 |
|
Threaded code bug update, it now appears to depend on day of the week.
|
# ? Aug 12, 2013 12:51 |
|
Zombywuf posted:Threaded code bug update, it now appears to depend on day of the week. We had a test case once which only ever failed on Sundays. qntm fucked around with this message at 15:13 on Aug 12, 2013 |
# ? Aug 12, 2013 15:11 |
|
Zombywuf posted:Threaded code bug update, it now appears to depend on day of the week. OpenOffice Cannot Print on Tuesdays
|
# ? Aug 12, 2013 15:16 |
|
Zombywuf posted:Threaded code bug update, it now appears to depend on day of the week. I recommend reading though TheDailyWtf until you find the made up story that mirrors this problem, then work backwards from there.
|
# ? Aug 12, 2013 16:39 |
|
NtotheTC posted:I recommend reading though TheDailyWtf until you find the made up story that mirrors this problem, then work backwards from there. There is nothing that mirrors this problem, nothing I tell you. I am currently suspecting the issue to be competing timeouts, that when one is hit that something waiting on the other timeout was not expecting causes the first to be ignored leading to the controlling thread to issue requests to an essentially defunct thread that is waiting to be told to exit due to the first timeout being hit. Various attempted remedies to this leading to cross thread calls being made to non-existent threads leading to segfaults (which are entirely timing dependant, somehow). Currently waiting on a timeout to be hit so I can check my latest debug logging.
|
# ? Aug 12, 2013 16:46 |
|
Suspicious Dish posted:OpenOffice Cannot Print on Tuesdays I had somehow not heard of this one, nice e: hah, wrong tab/window to ctrl+l, ctrl+c from No Safe Word fucked around with this message at 22:57 on Aug 12, 2013 |
# ? Aug 12, 2013 17:55 |
|
That is not the link you meant to post.
|
# ? Aug 12, 2013 22:55 |
|
Nah it seems legit. Click here to send a reply to this user.
|
# ? Aug 12, 2013 23:02 |
|
So I changed one of the unit tests to be a bit more thorough; specifically, testing rectangular matrices instead of just square ones. Then the application broke. It turns out that we're using the unit tests to populate the main database. It's not like the original designers didn't know a better way to do that, because they use an autoloaded XML file to populate the MySQL database...
|
# ? Aug 13, 2013 18:44 |
|
So uh, I just started on my first "real world assignment", a WPF application, and none of the classes, methods, XAML files or anything in the project have any comments or documentation whatsoever. There is no meta information explaining the structure of the application either. I've never worked with MVVM before so being thrown into this is rather disconcerting. Is this.. normal..?
|
# ? Aug 13, 2013 21:14 |
|
yes
|
# ? Aug 13, 2013 21:34 |
|
Good Will Hrunting posted:So uh, I just started on my first "real world assignment", a WPF application, and none of the classes, methods, XAML files or anything in the project have any comments or documentation whatsoever. There is no meta information explaining the structure of the application either. I've never worked with MVVM before so being thrown into this is rather disconcerting. Is this.. normal..? Nobody writes comments. If they do, they're unhelpful. If they're helpful, they're out-of-date. Also: Nobody writes commit messages.
|
# ? Aug 13, 2013 21:40 |
|
Wheany posted:Nobody writes comments. Sure they do. r394 - r393 oqpkczg r392 asdf r391 fix r390 a r389 a r388 stuff ... r2 stuff r1 initial commit The alternative being: Copy of index.php2copy of index.php.bak.index.php2.bak (2) Edit: .old Impotence fucked around with this message at 21:47 on Aug 13, 2013 |
# ? Aug 13, 2013 21:44 |
|
I love working in open source.
|
# ? Aug 13, 2013 22:13 |
|
Good Will Hrunting posted:So uh, I just started on my first "real world assignment", a WPF application, and none of the classes, methods, XAML files or anything in the project have any comments or documentation whatsoever. There is no meta information explaining the structure of the application either. I've never worked with MVVM before so being thrown into this is rather disconcerting. Is this.. normal..? If there's no documentation then there's no documentation to be incorrect. To get the real experience, the professor should have one group write a program that sends data to another group then have the other group read the data. Overall score between the two groups is based on correctness, then distributed based on the relative quality of their recriminations.
|
# ? Aug 13, 2013 22:36 |
|
Good Will Hrunting posted:So uh, I just started on my first "real world assignment", a WPF application, and none of the classes, methods, XAML files or anything in the project have any comments or documentation whatsoever. There is no meta information explaining the structure of the application either. I've never worked with MVVM before so being thrown into this is rather disconcerting. Is this.. normal..? The sooner you come to terms with it the less it will hurt. Welcome to the next 40 years of your life.
|
# ? Aug 13, 2013 23:17 |
|
Biowarfare posted:Sure they do. (Not mine) code:
|
# ? Aug 13, 2013 23:20 |
|
Good Will Hrunting posted:So uh, I just started on my first "real world assignment", a WPF application, and none of the classes, methods, XAML files or anything in the project have any comments or documentation whatsoever. There is no meta information explaining the structure of the application either. I've never worked with MVVM before so being thrown into this is rather disconcerting. Is this.. normal..? I firmly believe that well-written code is self-documenting. That goes double if you have good unit tests that are grouped around expected behavior. XML documentation is another thing; I make sure to always have that in-place and up-to-date, especially if I'm creating any sort of public API. I'll write comments if I'm doing something absolutely horrible-but-necessary or counter-intuitive, just so someone who comes after me doesn't go "why the gently caress did he do that? I'm going to rewrite it in the more intuitive way..."
|
# ? Aug 13, 2013 23:24 |
|
Good Will Hrunting posted:So uh, I just started on my first "real world assignment", a WPF application, and none of the classes, methods, XAML files or anything in the project have any comments or documentation whatsoever. There is no meta information explaining the structure of the application either. I've never worked with MVVM before so being thrown into this is rather disconcerting. Is this.. normal..? If you've never worked with any MVC-like pattern before, MVVM is a bit of a hill to climb, yeah. Are you even sure it uses MVVM? It's entirely possible to write WPF programs without employing that pattern. Ithaqua posted:I firmly believe that well-written code is self-documenting. That goes double if you have good unit tests that are grouped around expected behavior. I like including triple-slash comments on all my functions at minimum, just to get them into intellisense.
|
# ? Aug 13, 2013 23:29 |
|
Che Delilas posted:If you've never worked with any MVC-like pattern before, MVVM is a bit of a hill to climb, yeah. Are you even sure it uses MVVM? It's entirely possible to write WPF programs without employing that pattern. Truthfully I don't know if it's proper MVVM. This is my first job out of school, and I haven't touched anything MVC-like. The code is self-documenting enough for me to follow it. I'm not struggling to get things done, I was just surprised at the lack of any documentation on a project of this scope. Like I said, this is my first experience. The only other project I've worked on was an in-house prototype, which actually had stellar documentation (likely because it was being handed between people).
|
# ? Aug 13, 2013 23:45 |
|
Good Will Hrunting posted:Truthfully I don't know if it's proper MVVM. This is my first job out of school, and I haven't touched anything MVC-like. How much code is present in event handlers in the views? If the answer is "none" or "almost none", it's following MVVM properly. If the answer is "tons", it's not MVVM and you're in for a world of pain.
|
# ? Aug 13, 2013 23:49 |
|
Ithaqua posted:I firmly believe that well-written code is self-documenting. That goes double if you have good unit tests that are grouped around expected behavior. Which, while nice and to some extent true, doesn't excuse you from actually writing documentation. One step above well written code that I can examine is well documented code that I don't actually have to physically examine to understand.
|
# ? Aug 14, 2013 01:56 |
|
Volmarias posted:Which, while nice and to some extent true, doesn't excuse you from actually writing documentation. One step above well written code that I can examine is well documented code that I don't actually have to physically examine to understand. Documentation of a software product and/or API is a different story.
|
# ? Aug 14, 2013 02:20 |
|
Ithaqua posted:Documentation of a software product and/or API is a different story. Ask me about the "self documenting" spaghetti code that my coworker has written that needs to be maintained. I dare you.
|
# ? Aug 14, 2013 03:28 |
|
If he did try to document it then you'd probably just be complaining about his incoherent and incorrect documentation instead.
|
# ? Aug 14, 2013 03:33 |
|
If they can't write coherent code I cannot imagine coherent documentation. Maybe if he writes the documentation though a light bulb might flicker and the lack of a plan is noticed.
|
# ? Aug 14, 2013 03:41 |
|
Ithaqua posted:I firmly believe that well-written code is self-documenting. That goes double if you have good unit tests that are grouped around expected behavior.
|
# ? Aug 14, 2013 03:49 |
|
Self-documenting code can only ever cover the what, it can never cover the why. That said, I prefer a well written external document explaining the rationale behind the code to having to sift through tons of comments strewn everywhere (particularly massive headers that are bigger than the function itself). Plus when the documentation is external and tied to a particular version of the code, there's less of a mindfuck when you realize that the comments are out of date and don't spend 20 minutes trying to reconcile what the documentation says versus what the code actually does.
|
# ? Aug 14, 2013 03:58 |
|
Volte posted:Self-documenting code can only ever cover the what, it can never cover the why. The "why" is (ideally) part of the commit message in source control. I've smacked devs upside the head (metaphorically speaking) for committing a changeset with a description like "removed the foo". Yes, I can look at a diff of the code and see that you removed the foo. Why did you remove the foo? Crosscontaminant posted:I agree, but I find the problem is that when you're actively working on the code and have the whole thing in your head, you can't tell the difference between "self-documenting" and "obvious to you and you alone". That's why I'm a strong proponent of giving my unit tests good, descriptive names. You can look at my unit tests and get a sense of what my program is supposed to be doing. And since my tests pass, run in isolation, and only test a single thing, they confirm that the behavior is implemented as written. For example (in C#, mentally transliterate to your language and testing framework of choice) C# code:
New Yorp New Yorp fucked around with this message at 04:08 on Aug 14, 2013 |
# ? Aug 14, 2013 04:04 |
|
|
# ? May 28, 2024 05:48 |
|
I've come to the conclusion that having a good logging framework and logging statements to go with them also helps in explaining what is going on. It still doesn't explain why it's being done the way it is, but it does a marginal job of throwing some human language into the picture. OTOH I'm dealing with people that don't even want to declare classes in Python because that takes more keystrokes, so it's a losing battle.
|
# ? Aug 14, 2013 05:39 |