Language:
switch to room list switch to menu My folders
Go to page: First ... 9 10 11 12 [13] 14 15 16 17 ... Last
[#] Fri Jan 30 2015 10:37:27 EST from IGnatius T Foobar

[Reply] [ReplyQuoted] [Headers] [Print]

cURL is the correct capitalization. However, the phrase "REST client" sounds like someone doesn't really understand REST.

He/she/it should be using libcurl, not the cURL "client"

[#] Fri Jan 30 2015 14:46:01 EST from LoanShark

[Reply] [ReplyQuoted] [Headers] [Print]

Why write good code when you can just wrap the whole damn thing in an

exception handler?

Been dealing with our Junior Dev(tm) who did just that, this week. No, you can't just write crap in the exception handler and assume that it will never be hit.

[#] Sat Jan 31 2015 18:57:25 EST from fleeb

[Reply] [ReplyQuoted] [Headers] [Print]


To be clear, I knew cURL is spelled correctly, however 'is cURL a type of rest client?" has a variety of capitalization problems, which is more along the lines of what I meant about preserving the original. I wasn't making fun of the person's English skills, or even meaning to comment on them, only to indicate that those were not my errors.

[#] Sun Feb 01 2015 07:41:26 EST from dothebart

[Reply] [ReplyQuoted] [Headers] [Print]

[#] Mon Feb 02 2015 23:52:44 EST from ax25

[Reply] [ReplyQuoted] [Headers] [Print]

Like the humor on the right side of the page here:

http://jshint.com/about/

Thanks dothebart.  I will check it out and share it with my co-workers.  I always wondered if a lint tool for javascript would be possible with its syntax :-)



[#] Thu Feb 05 2015 08:44:17 EST from dothebart

[Reply] [ReplyQuoted] [Headers] [Print]

any of you interested in valgrind these slides may be of interest.

                  https://fosdem.org/2015/schedule/track/valgrind/



[#] Sat Feb 07 2015 15:08:23 EST from IGnatius T Foobar

[Reply] [ReplyQuoted] [Headers] [Print]

Been dealing with our Junior Dev(tm) who did just that, this week. No,

you can't just write crap in the exception handler and assume that it

will never be hit.

Actually I was thinking the other way around -- that exception handlers can encourage sloppy code because any oddball conditions would cause the handler to cleanly return an error instead of crashing the whole program.

[#] Sat Feb 07 2015 17:49:04 EST from dothebart

[Reply] [ReplyQuoted] [Headers] [Print]

yea, thats the theory.

however, I've heard that i.e. java or linters tend to be very picky about this, so people start doing empty catch handlers - wasting the original error with no trace.

Propper errorhandling is always a challenge.

I tend to find (and fix) quiet a bunch of them, wasting the original error condition and leaving no trace to the user to find their mistake without gdb :-(

Citserver has meanwile become pretty good at handling the errors, _and_ reporting.



[#] Sat Feb 07 2015 19:53:33 EST from fleeb

[Reply] [ReplyQuoted] [Headers] [Print]


I find the exception handling jarring.

Instead of handling an error code with a clean if statement, you have this insane try/catch thing that fucks up the flow of the code such that it looks like a mess. It's much, much harder to read some of the simplest of conditions because of the fucked up approach required to deal with exception handling, as opposed to handling a return code.

Furthermore, you have no freaking idea who might have raised the exception.
You might want to assume the function you called raised the error, but that isn't necessarily true... it could have been raised by some other arbitrary thing that the function you called called.

And because of the omnipresent nature of exceptions, as used in fucking Java, even if you tried to enforce some kind of rule of 'make sure your function handles every possible exception that each function it calls could raise', you will still lose when someone adds some new exception that you can't anticipate later on.

And the code... the fucking code... it looks like someone puked all over it, it's so nasty.

Years ago, I thought exceptions were kind of cool. That an exception could be raised, cleanly (so I thought) handling any sort of memory management issues in C++ through a common idiom of using constructors and destructors to help manage memory and all that crap. But in practice, I find it's totally shit.
It encourages the writing of code that's harder to understand because the flow of control isn't obvious anymore.

For something absolutely catastrophic, sure, raise an exception. But the wholesale embracing of this form of error management for even the slightest of errors (as used in Java), it's just horrible.

[#] Sun Feb 08 2015 07:45:05 EST from TaMeR

Subject: Coding is like magic

[Reply] [ReplyQuoted] [Headers] [Print]

Coding is like magic !
You get what you ask for !

TaMeR



[#] Mon Feb 09 2015 07:57:37 EST from dothebart

[Reply] [ReplyQuoted] [Headers] [Print]

I guess for exceptions counts the same as for C++ 11 auto: you can make it to get your programm slink, but you have to act carefully, else you will end up with an unreadable mess.



[#] Mon Feb 09 2015 11:55:49 EST from fleeb

[Reply] [ReplyQuoted] [Headers] [Print]


Yeah... auto... I haven't embraced it.

I think in small doses it might be okay, but gads, if used liberally I think it's a poor excuse for knowing your types.

But then, I really, really like the strongly typed nature of C++.

[#] Mon Feb 09 2015 17:33:32 EST from dothebart

[Reply] [ReplyQuoted] [Headers] [Print]

auto is ok where it helps with DRY - http://en.wikipedia.org/wiki/Don%27t_repeat_yourself

but that should be about it.



[#] Mon Feb 09 2015 18:31:49 EST from TaMeR to room_Programming@uncensored.citadel.org

Subject: Re: Coding is like magic

[Reply] [ReplyQuoted] [Headers] [Print]

I been playing with react a javascript toy by Facebook.
I wonder what else they will come up with.

Why can't they just use plain javascript I don't get it. Is it not cool
enough?

This is hello world in react:

```
var HelloMessage = React.createClass({
render: function() {
return <div>Hello {this.props.name}</div>;
}
});

React.render(<HelloMessage name="John" />, mountNode);
```

http://facebook.github.io/react/

[#] Mon Feb 09 2015 21:24:44 EST from LoanShark

[Reply] [ReplyQuoted] [Headers] [Print]

however, I've heard that i.e. java or linters tend to be very picky
about this, so people start doing empty catch handlers - wasting the
original error with no trace.

Not really, yes java has strong type checking around checked exceptions, which requires you to catch that exception and deal with it or the compiler will barf--but if you then ignore it with an empty catch block you have only yourself to blame. There is a certain type of programmer - the type of person that doesn't understand that coding standards matter (I also call them assholes), who do this too much. Or maybe there's this mentality that it's OK to just sweep shit under the rug because the overall flow must go on and you're never going to debug it anyway and besides, it can't possibly be wrong because you're god...

I work with some jerks.

[#] Tue Feb 10 2015 08:42:18 EST from fleeb

[Reply] [ReplyQuoted] [Headers] [Print]


Heh... 'WET'... Write Everything Twice, or We Enjoy Typing. I like that.

[#] Tue Feb 10 2015 08:45:04 EST from fleeb

[Reply] [ReplyQuoted] [Headers] [Print]


But, yeah, I see hints of 'auto' being used by some folks as a kind of lazy way to avoid dealing with type checking rather than an application of DRY, and I've already been bit by it where the guy responsible for the offense didn't quite understand what he was doing (wasn't paying attention to types).

This isn't to say I hate 'auto'. It's more to say, be careful how you use it.

[#] Wed Feb 11 2015 16:19:32 EST from IGnatius T Foobar

[Reply] [ReplyQuoted] [Headers] [Print]

But then, I really, really like the strongly typed nature of C++.

...until someone types "const" once, and you're stuck with it forever

[#] Fri Feb 13 2015 04:53:28 EST from fleeb

[Reply] [ReplyQuoted] [Headers] [Print]


Nope, I love const. It has protected me from many a disaster and has forced me to write better code. I embrace const. Although I might not kiss and make love to it.

[#] Fri Feb 13 2015 08:31:22 EST from dothebart

[Reply] [ReplyQuoted] [Headers] [Print]

Heh, yes const.

nice faqs:

http://oroboro.com

especialy love the backtrace howto article.

(citserver has backtraces, doesn't need C++ demangling, but arangodb needs that...)



Go to page: First ... 9 10 11 12 [13] 14 15 16 17 ... Last