Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Jewel
May 2, 2009

No semicolons! Hooray! No visual clutter or hard to remember things to place! ..Except if you want to go to a newline use uhhh... oh, an arrow! "->". Oh and operators too I guess need them. So make operators work the same as an arrow. But only if you end the line with them. Oh and what about function declarations.. eh who cares just put a slash on the end. Huh? Scopes without a statement in front of them? Whatever just shove more slashes in!!!

Easy to remember! Simple rules!

Adbot
ADBOT LOVES YOU

Internet Janitor
May 17, 2008

"That isn't the appropriate trash receptacle."
Basically when people claim that randomly shuffling around punctuation marks makes a language clearer or simpler they should lose keyboard privileges.

Jewel
May 2, 2009

I just realised in the code sample they posted:

Example for their language:
C++ code:
auto LogDomain<E>::append(const E& event) 
    for const auto& appender : _appenders
        if appender 
Example for C++:
C++ code:
Status LogDomain<E>::append(const E& event) {
    for (typename AppenderVector::const_iterator iter = _appenders.begin();
        iter != _appenders.end(); ++iter) {
            if (*iter) {
Nice job trying to make the code seem longer in C++ to prove a point. Pretty sure with C++11's for each you can just:

C++ code:
Status LogDomain<E>::append(const E& event) {
    for (const auto& appender : _appenders) {
        if (*appender) {
Edit: vvv Oh yeah, they have an "auto" return type. That's absolutely garbage.

Jewel fucked around with this message at 05:59 on May 9, 2014

Coffee Mugshot
Jun 26, 2010

by Lowtax
I just wish people used the auto keyword responsibly.

Zemyla
Aug 6, 2008

I'll take her off your hands. Pleasure doing business with you!

Jewel posted:

Edit: vvv Oh yeah, they have an "auto" return type. That's absolutely garbage.
That's actually a feature being added to C++14. It works if every return is the same type.

Jewel
May 2, 2009

Zemyla posted:

That's actually a feature being added to C++14. It works if every return is the same type.

Yes, I didn't mean "their language" has the return type, I meant "their code". It's garbage. "Auto" return is horrifying from a code perspective imo since you can't tell what a function returns without working out the return type (and if the return type is another method that returns auto, have fun!), and I wouldn't think any code reviewers would let anyone use it in professional code.

Zombywuf
Mar 29, 2008

Harik posted:

Anyway, I tried rxvt-unicode but it can't handle (╯°□°)╯︵ ┻━┻ properly, and as an IRC native that just wouldn't do.

Works for me. :-/

quote:

Also the font-support is weird, if I specified multiple fonts it put them in huge boxes:
code:
l e a d i n g     t o    l i n e s   l i k e   t h i s .

Fontconfig giveth and fontconfig taketh away.

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.
Can I add everything with the word "delightful" in its GitHub description to this thread?

Internet Janitor posted:

It does preserve the directory you were in, but the other stuff kinda sucks.

Where is this secret switch located? I'm always dumped back at ~.

Simulated
Sep 28, 2001
Lowtax giveth, and Lowtax taketh away.
College Slice

Jewel posted:

Yes, I didn't mean "their language" has the return type, I meant "their code". It's garbage. "Auto" return is horrifying from a code perspective imo since you can't tell what a function returns without working out the return type (and if the return type is another method that returns auto, have fun!), and I wouldn't think any code reviewers would let anyone use it in professional code.

The horror is coming from inside the house!

If you aren't using an IDE or editor that gives you realtime intellisense feedback about auto/var types then you're using the wrong one. Every argument I've ever heard against compiler inferred types has turned out to be a non-issue in my experience.

b0lt
Apr 29, 2005

Ender.uNF posted:

The horror is coming from inside the house!

If you aren't using an IDE or editor that gives you realtime intellisense feedback about auto/var types then you're using the wrong one. Every argument I've ever heard against compiler inferred types has turned out to be a non-issue in my experience.

Yeah, if you can't mouse over a variable and get something reasonable like std::unordered_map<std::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::hash<std::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::equal_to<std::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<const std::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::basic_string<char, std::char_traits<char>, std::allocator<char>>>, you should switch to something else.

het
Nov 14, 2002

A dark black past
is my most valued
possession

pokeyman posted:

Can I add everything with the word "delightful" in its GitHub description to this thread?


Where is this secret switch located? I'm always dumped back at ~.
I've never had to do anything that I can recall, each tab is restored in the same directory.

Doctor w-rw-rw-
Jun 24, 2008

pokeyman posted:

Can I add everything with the word "delightful" in its GitHub description to this thread?
That sounds like it would be delightful.

pokeyman posted:

Where is this secret switch located? I'm always dumped back at ~.
Probably the same switch in Terminal.app settings that lets you open new terminals from ~ or the same directory?

chippy
Aug 16, 2006

OK I DON'T GET IT
I'm just gonna leave this here and let you pick your own horrors

code:
    'Load everything featuring Nero.

    Private Sub Nero_rock()

        Dim Guilt As Integer 'Skill
        Dim Guilt2 As Integer 'Skill2
        Dim Guilt3 As Integer 'Skill3
        Dim Guilt4 As Integer 'Skill4

        Dim Crush As String 'Interval
        Dim You_Found_Out As String 'Positive
        Dim My_Eyes As String 'Negative

        Dim Wasted_On_Myself As String
        Dim Me_And_You As String

        Wasted_On_Myself = "SELECT Routing_Process.*, Routing_Status.ID, Routing_Status.Routing_Status AS RS FROM Routing_Process INNER JOIN Routing_Status ON Routing_Process.ID = Routing_Status.Process_ID WHERE Routing_Process.ID = '" & myProcessID & "' AND Routing_Status.OK = 1"
        Me_And_You = "SELECT Routing_Process.*, Routing_Status.ID, Routing_Status.Routing_Status AS RS FROM Routing_Process INNER JOIN Routing_Status ON Routing_Process.ID = Routing_Status.Process_ID WHERE Routing_Process.ID = '" & myProcessID & "' AND Routing_Status.OK = 0"

        Dim Sometimes_I_Dont_Know_Where_Were_Going As New SqlClient.SqlConnection(My.Settings.Fusion_AWS_DataConnectionString)

        Dim You_Keep_On_Talking_But_It_Makes_No_Sense_At_All As New SqlClient.SqlCommand(Wasted_On_Myself, Sometimes_I_Dont_Know_Where_Were_Going)
        Dim I_Feel_This_Confused As New SqlClient.SqlCommand(Me_And_You, Sometimes_I_Dont_Know_Where_Were_Going)

        Dim Promises As SqlClient.SqlDataReader
        Dim Nero As SqlClient.SqlDataReader

        Call Sometimes_I_Dont_Know_Where_Were_Going.Open()

        Promises = You_Keep_On_Talking_But_It_Makes_No_Sense_At_All.ExecuteReader
        Nero = I_Feel_This_Confused.ExecuteReader

        If Promises.HasRows Then
            Promises.Read()
            Nero.Read()

            txtProcessName.Text = Promises("Process_Name").ToString
            txtDescription.Text = Promises("Description").ToString
            You_Found_Out = Promises("RS").ToString
            My_Eyes = Nero("RS").ToString
            Guilt = Promises("Skill_ID")
            Guilt2 = Promises("Skill_ID2")
            Guilt3 = Promises("Skill_ID3")
            Guilt4 = Promises("Skill_ID4")
            Crush = Promises("Sample_Number")
            rdoSample.Checked = Promises("Sample")
            rdoSubProcess.Checked = Promises("Sub_Process")
            rdoFirstOff.Checked = Promises("First_Off")
            chkRework.Checked = Promises("Rework_Process")
            chkDuplicates.Checked = Promises("Duplicates")
            chkHand.Checked = Promises("Hand")
            chkForceRescan.Checked = Promises("ReworkForcesRescan")
            If IsDBNull(Promises("WorkOrderOnlyScan")) Then
                rdoWorkOrderOnly.Checked = False
            Else
                rdoWorkOrderOnly.Checked = Promises("WorkOrderOnlyScan")
            End If
            txtBarcode.Text = Promises("Barcode")
            originalBarcode = Promises("Barcode")
            rdoPanelisation.Checked = Promises("Panelisation")
            chkInspectionProcess.Checked = Promises("Inspection")

        Else
            Call MsgBox("An error has been detected, please report this message to your administrator.", MsgBoxStyle.OkOnly, "Error: Datareader has no rows")
            Exit Sub
        End If

            'You got me so high

            cmbSkill.SelectedValue = Guilt
            cmbSkill2.SelectedValue = Guilt2
            cmbSkill3.SelectedValue = Guilt3
            cmbSkill4.SelectedValue = Guilt4
            cmbSample.SelectedText = Crush
            cmbPositive.SelectedText = You_Found_Out
            cmbNegative.SelectedText = My_Eyes

        If rdoSample.Checked Then
            cmbSample.Enabled = True
        Else
            cmbSample.Enabled = False
        End If

    End Sub

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

het posted:

I've never had to do anything that I can recall, each tab is restored in the same directory.

Oh, it's my fault (surprise) for using zsh.

Westie
May 30, 2013



Baboon Simulator

chippy posted:

I'm just gonna leave this here and let you pick your own horrors

code:
steaming piles of poo poo

That can't be real.

revmoo
May 25, 2006

#basta
Hmm I wonder what album he was listening to when writing that monstrosity.

Steve French
Sep 8, 2003

Voted Worst Mom posted:

http://cpprocks.com/what-if-c-looked-more-like-python-or-coffeescript/

As a person who likes to write C/C++, Python, and Coffeescript, I am deeply offended.

The worst part of this is the horrendously inconsistent indentation

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe

Ender.uNF posted:

The horror is coming from inside the house!

Stop saying this for dumb arguments.

Plorkyeran
Mar 22, 2007

To Escape The Shackles Of The Old Forums, We Must Reject The Tribal Negativity He Endorsed

pokeyman posted:

Oh, it's my fault (surprise) for using zsh.
Current directories are restored for me with zsh, but they used to not be, and I don't remember explicitly changing anything to make it start working...

chippy
Aug 16, 2006

OK I DON'T GET IT

Westie posted:

That can't be real.

Sadly it is not only real but it is part of a much larger project which is equally bad throughout and which I have to maintain and extend. And I only get enough time to hastily bolt stuff on rather than doing any sort of meaningful refactoring or restructuring. Although I have at least managed to squeeze in a DAL/ORM-lite using Dapper in the areas I've worked on.

And this is my first real dev job (I used to be in testing and test automation) and I haven't done WinForms stuff before so don't necessarily know the right way of doing things myself, only that this is horrible. And I have sole responsibility for it now.

Luckily the other main thing I work on is a ASP.NET MVC application in C# and, more importantly, is written by a relatively sane person who is a proper developer. The difference really is night and day.

chippy fucked around with this message at 16:07 on May 9, 2014

Jethro
Jun 1, 2000

I was raised on the dairy, Bitch!

chippy posted:

I'm just gonna leave this here and let you pick your own horrors

code:
    'snip
Making fun of student projects just isn't fair.

chippy posted:

And this is my first real dev job.
Oh... I'm so sorry.

chippy
Aug 16, 2006

OK I DON'T GET IT
In all fairness, the guy who wrote it is aware that it's terrible, doesn't consider himself a coder, and has nothing to do with our dev work any more so at least I can take the piss out of him for it and he's quite happy for me to rip out and replace his stuff (when I have the time).

On the other hand, this thing is actually running a factory and of course I take the flak for anything that goes wrong with it.


And I'm not that experienced so there's probably some horrors of my own in there, but at least I know I can only be improving the average.

lord funk
Feb 16, 2004

Code that makes me laugh, just cause I like saying it out loud:

Objective-C code:
AVPlayerLayer *playerLayer = [AVPlayerLayer playerLayerWithPlayer:player];

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

lord funk posted:

Code that makes me laugh, just cause I like saying it out loud:

Objective-C code:
AVPlayerLayer *playerLayer = [AVPlayerLayer playerLayerWithPlayer:player];

Don't hate the layer, hate the game.

Fuck them
Jan 21, 2011

and their bullshit
:yotj:
I swear to god read aloud that's the intro to YYZ.

lord funk
Feb 16, 2004

gently caress them posted:

I swear to god read aloud that's the intro to YYZ.

:lol:

Sulla Faex
May 14, 2010

No man ever did me so much good, or enemy so much harm, but I repaid him with ENDLESS SHITPOSTING
Here's the song that matches the lyrics:

https://www.youtube.com/watch?v=UhQue5DpYoU

(probably :nws: due to pole dancing and lovely dubstep)

Verloc
Feb 15, 2001

Note to self: Posting 'lulz' is not a good idea.

chippy posted:

I'm just gonna leave this here and let you pick your own horrors

code:
   lovecraftian horror
:stonklol:

No words. Should have sent a poet.

Ego Trip
Aug 28, 2012

A tenacious little mouse!


chippy posted:

I'm just gonna leave this here and let you pick your own horrors

Put in your two years and :yotj:.

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...

chippy posted:

In all fairness, the guy who wrote it is aware that it's terrible, doesn't consider himself a coder, and has nothing to do with our dev work any more so at least I can take the piss out of him for it and he's quite happy for me to rip out and replace his stuff (when I have the time).

On the other hand, this thing is actually running a factory and of course I take the flak for anything that goes wrong with it.


And I'm not that experienced so there's probably some horrors of my own in there, but at least I know I can only be improving the average.

:stonk:

Don't stand too close to the machines!

revmoo
May 25, 2006

#basta
Flak in this case is not actually a metaphor.

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

chippy posted:

On the other hand, this thing is actually running a factory and of course I take the flak for anything that goes wrong with it.

Are the error messages great? I bet the error messages are really great.

fritz
Jul 26, 2003

The guy I have to work with got upset again because I dared put in a PR that changes a "unique" function to actually uniquify an object instead of doing nothing.

QuarkJets
Sep 8, 2008

Not really a "coding horror" per se, but I found out today that our hardware tracking system has entries for a bunch of random bash scripts, thinks like "test.sh" and "my_script.sh", no file paths or where the script is hosted or even a description of what the script does. It's like layer upon layer of bad practices. I bet that if we ever find and open these scripts they'll be full of all sorts of stupid poo poo

Plorkyeran posted:

I'm always sort of amused by the fact that OS X has better terminal emulators than Linux.

That's because the terminal that comes with OS X is garbage, whereas most Linux terminals are pretty good by default

QuantumCrayons
Apr 11, 2010
Here's my contribution from a wee while back (don't think I've posted it yet). This was written by an end user over the course of several years, who left the company a week after I joined for some temp work. If this system breaks, the whole site goes down.


There is no naming convention logic I can find, and there are literally hundreds of these scripts in the system, all arranged like this.

chippy
Aug 16, 2006

OK I DON'T GET IT

Ego Trip posted:

Put in your two years and :yotj:.

Think I could get away with one?

Fullets
Feb 5, 2009

pokeyman posted:

Oh, it's my fault (surprise) for using zsh.

You probably need to hook up the escape sequences that let Terminal.app know what the current directory is for any given tab. My .zshrc has the following:

code:
if [[ $TERM_PROGRAM = "Apple_Terminal" && -z $INSIDE_EMACS ]] then
    update_terminal_cwd() {
        printf '\e]7;%s\a' "file://$HOST${PWD// /%20}"
    }
    autoload add-zsh-hook
    add-zsh-hook chpwd update_terminal_cwd
    update_terminal_cwd
fi

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

Fullets posted:

You probably need to hook up the escape sequences that let Terminal.app know what the current directory is for any given tab.

That does it!

Ego Trip
Aug 28, 2012

A tenacious little mouse!


chippy posted:

Think I could get away with one?

If this was an internal move from T&A, then you can go now. No need to tell anyone when you became a dev.
If not, then ehhhh. Two years is just my benchmark for when you look less like a job hopper and more like someone that found themselves ready to move on.

Adbot
ADBOT LOVES YOU

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe

Ego Trip posted:

If this was an internal move from T&A, then you can go now.

Excuse me?

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply