Live data from Hacker News

Problems with Oracle SQL

codingtofreedom.com

231–240 of 277 posts

Re: Problems with Oracle SQL

#231

Earlier quoted context omitted.

I'm not sure why the hate against MSDN - at least for .NET, I found the documentation to be one of the best in the business -even a decade ago. I'd only put Go's docs ahead in terms of helpfulness. I cut my teeth writing .NET code, then switched to Java writing apps on Android - the step down in doc quality was quite significant.

Win32 and .Net docs are great! Azure and Powershell docs leave a lot to be desired. A lot of the time parameters are vaguely documented, return values completely undocumented. You have to inspect the object returned by a lot of things to get to understand what members and methods it has, and what they mean. Examples illustrating what formats it expects inputs in? Forget it.

PowerShell is easy to debug though. So I never have a problem with that. I generally program in it without ever looking at any documentation. I just don't need it.

Just get-help -full/get-member everything or export-clixml it. But maybe I've done it for too long, so I don't see the weaknesses anymore.

Re: Problems with Oracle SQL

#232
post #155

Earlier quoted context omitted.

I learned a lot of different programming languages. But I’ve never seen something as cryptic as power shell. Sometimes I write the same script as PS and as bash script. For PS I usually need 3x more characters than for bash. There are some features though that are really useful. But most of the time you won’t know about them when you need them.

> Sometimes I write the same script as PS and as bash script. That's your mistake! Don't write bash scripts in PowerShell, and don't write PowerShell scripts in bash. Don't be surprised if the shopkeeper can't understand you, when you're speaking "French" by translating an English sentence word for word. PowerShell is much more readable, terse, and elegant than Bash. It absolutely blows it out of the water... on Wind…

PowerShell elegant? Wow. No way. I've written hundreds of thousands of lines of PowerShell on Windows over the years. PowerShell is great for one-liners and very short scripts. It also has many cool hooks into the OS that makes things more comfy. That said, as soon as you need to write a modestly long script or need something remotely performant, you're going to want to reach for the nearest pencil to shove into your ear. I'll take Bash with all its limitations and arcane warts every time. I vastly prefer Python to either Bash or PowerShell for anything serious.

A sterling example of PowerShell's inanity is its brain-dead, ivory tower implementation of function return values. Anything that outputs to stdout gets added to the return value object for your function. Forgetting for a moment how non-standard and unexpected this is, consider that it’s impossible to completely silence many, many Windows commands CLI programs and utilities. Even with all the silent flags, output redirection, etc. it is simply impossible to silence stdout. What you end up with is... you just can't ever use return values in functions since it's so unreliable. This, coupled with PowerShell's atrocious performance (it's the worst performing scripting language I've used by far) instantly makes PowerShell a second class language for anything apart from very small scripts.

I've never heard anyone call PowerShell “terse” until today. It is currently winning the competition with Java for “Language whose inventor is most likely paid per keystroke”. PowerShell's arguments are extremely verbose and lines tend to become quite long as a result.

Disclaimer: I’m a recovering Windows Admin and haven't used PowerShell in a few years. I'm told that none of these problems have been fixed, but I don't know for a fact.

Re: Problems with Oracle SQL

#233

Earlier quoted context omitted.

One of oracle quirks for me is varchar2. What happened to varchar1? Nobody knows.

varchar1 was varchar. I should say "is", since varchar is still supported, they just recommend varchar2 since varchar "might change" (probably not...)

That one actually changed already. If you follow the new recommendations, varchar is as good as varchar2.

Re: Problems with Oracle SQL

#234
post #79

The thing that kills me about Oracle is that since the license does not allow benchmarking, we (or at least I) don't know how it actually stacks up to the competition. Of course, that's the idea, but it would be cool to have that data.

Someone who has performance worth the money would not inhibit the benchmarking of it.

Indeed. You could do it, just can't publish the results without backlash.

Re: Problems with Oracle SQL

#235

Earlier quoted context omitted.

> Sometimes I write the same script as PS and as bash script. That's your mistake! Don't write bash scripts in PowerShell, and don't write PowerShell scripts in bash. Don't be surprised if the shopkeeper can't understand you, when you're speaking "French" by translating an English sentence word for word. PowerShell is much more readable, terse, and elegant than Bash. It absolutely blows it out of the water... on Wind…

PowerShell elegant? Wow. No way. I've written hundreds of thousands of lines of PowerShell on Windows over the years. PowerShell is great for one-liners and very short scripts. It also has many cool hooks into the OS that makes things more comfy. That said, as soon as you need to write a modestly long script or need something remotely performant, you're going to want to reach for the nearest pencil to shove into your…

The performance problems, at least, have had some TLC applied to them and are much better in PowerShell core (the one that goes by pwsh), to the point that I don't hate using PowerShell interactively now.

Re: Problems with Oracle SQL

#236
> You lose hope for humanity’s continued existence, and start adding log outputs after each and every function call to finally figure out where the script stops working

Good to know I’m not the only one doing it this way. Sometimes it’s the only way.

Post reply on HN