This forum is in permanent archive mode. Our new active community can be found here.

Weekend coding

13334363839

Comments

  • Apreche said:

    Obviously you press the tab key. Who would press the spacebar four times? That's the dumbest thing I've ever heard.

    My professor writes his code using spaces for tabs but varies between 1 - 3 manually typed spaces so that when you load his code into a text editor, it can't determine what spacing is appropriate.
  • sK0pe said:

    Apreche said:

    Obviously you press the tab key. Who would press the spacebar four times? That's the dumbest thing I've ever heard.

    My professor writes his code using spaces for tabs but varies between 1 - 3 manually typed spaces so that when you load his code into a text editor, it can't determine what spacing is appropriate.
    Murder him in his sleep.
  • Anyways Google style's converted me from 4-space soft tabs to two-space soft tabs - they're not significantly harder to read and they waste slightly less screen space so you can read more at once.

    Also Google style indicates an 80-char line limit for legacy reasons so every character counts. :P
  • Anyways Google style's converted me from 4-space soft tabs to two-space soft tabs - they're not significantly harder to read and they waste slightly less screen space so you can read more at once.

    Also Google style indicates an 80-char line limit for legacy reasons so every character counts. :P

    That's so backwards. Do the four spaces and get rid of the 80 limit. I go to 99. Nobody out there is actually using an editor that still can't be wider than 80 chars. Does your co-worker really have a VT100 on their desk? Think that's what they're using in the data center?
  • The problem with tabs is that they can also create issues in things like Python. If you always use spaces then you'll be fine.
  • MATATAT said:

    The problem with tabs is that they can also create issues in things like Python. If you always use spaces then you'll be fine.

    I've never had an issue with using tabs in python?
  • You all sound horrible to collaborate with ;) Except for maybe Scott.
  • Neito said:

    MATATAT said:

    The problem with tabs is that they can also create issues in things like Python. If you always use spaces then you'll be fine.

    I've never had an issue with using tabs in python?
    Because you've never used them, right? Because the official style guide says don't use them, right? Nope, no tabs to see here. Move along, citizen.
  • Apreche said:

    Anyways Google style's converted me from 4-space soft tabs to two-space soft tabs - they're not significantly harder to read and they waste slightly less screen space so you can read more at once.

    Also Google style indicates an 80-char line limit for legacy reasons so every character counts. :P

    That's so backwards. Do the four spaces and get rid of the 80 limit. I go to 99. Nobody out there is actually using an editor that still can't be wider than 80 chars. Does your co-worker really have a VT100 on their desk? Think that's what they're using in the data center?
    "Legacy reasons" are a helluva drug.

    I'm also finding two-space code easier to read - four-space indents add unnecessary white space.
  • Andrew said:

    You all sound horrible to collaborate with ;) Except for maybe Scott.

    If I'm working with others, I'll work according to a set standard. If I'm writing a shitty little one-off script nobody's going to see, I don't give a shit.
  • edited April 2016
    Neito said:

    If I'm writing a shitty little one-off script nobody's going to see, I don't give a shit.

    Want to know why I'll never write code with you?

    Post edited by Andrew on
  • You can judge a professional not so easily by their best efforts, but by their minimum efforts.
  • If tabs instead of spaces and Allman braces belay an extreme lack of ability, then call me guilty. Cus that's the only thing that changes between Public and Private code from me.
  • edited April 2016
    Neito said:

    If tabs instead of spaces and Allman braces belay an extreme lack of ability, then call me guilty. Cus that's the only thing that changes between Public and Private code from me.

    If you don't give a shit about how legible or visually clean your code is, what else didn't you give a shit about when writing it? Maybe you dynamically allocated a fuck ton of memory and didn't clean up because "HA, no one will ever see this". Or perhaps your design methodology is all sorts of fucked because you just didn't care and wrote spaghetti code.

    Writing software is my profession. You don't see artists not caring about their private sketches just because they aren't public.
    Post edited by Andrew on
  • edited April 2016
    Andrew said:

    Neito said:

    If tabs instead of spaces and Allman braces belay an extreme lack of ability, then call me guilty. Cus that's the only thing that changes between Public and Private code from me.

    If you don't give a shit about how legible or visually clean your code is, what else didn't you give a shit about when writing it? Maybe you dynamically allocated a fuck ton of memory and didn't clean up because "HA, no one will ever see this". Or perhaps your design methodology is all sorts of fucked because you just didn't care and wrote spaghetti code.

    Writing software is my profession. You don't see artists not caring about their private sketches just because they aren't public.
    Where did I say I didn't care about my legibility or cleanlyness of code? All I said was I don't give a shit about the distinction between tabs and spaces on my own personal code.

    Edit: Looking back, I realize that the default way to interperate my comment is "I don't give a shit about any sense of style or cleanlyness". What I meant was "I don't care about tabs vs. spaces, and thus use tabs".

    Writing software is also my profession, and I understand your passion on this subject. I was unclear in what I meant when I said "Who gives a shit".
    Post edited by Neito on


  • Dude gives a programming talk. He takes all monosyllabic words as primitives, and has to define any polysyllabic words before he uses them.

    O_O
  • Anybody with a Pebble (any of them) want to help me test out a Hangouts client I wrote?
  • Yeah; I'm through the Qualification round, pretty easily.
  • I guess no one else (except sk0pe) participated? It's a fun competition.
  • I wanted to, but no time with business travel and trying to find a place to live.
  • edited April 2016
    Yeah, I wanted to as well. idk why they made it during uni exam time.
    Post edited by Pegu on
  • I did the Qual round internally about a week before it went live, so I wasn't allowed to talk about it until now.
    That coinjam problem was mean.
  • Yeah, that one was interesting, although not exactly "mean". In my case, it helped a lot that I brute-forced the small cases and then looked for patterns in the output.
  • edited April 2016

    I did the Qual round internally about a week before it went live, so I wasn't allowed to talk about it until now.
    That coinjam problem was mean.

    Yeah, that one was interesting, although not exactly "mean". In my case, it helped a lot that I brute-forced the small cases and then looked for patterns in the output.

    I didn't do it because I'm doing mid semester and knew I had qualified off the first 2 problems.

    Could you not just pre-computer primes <= 1111111111111111 and put them in a hash set then brute force until you found a valid answer?

    I'm not sure how many operations I was allowed as time caps weren't mentioned for the question for the big data set, I usually know what's possible by estimating 50,000,000 operations per second.

    Also hadn't looked at q4.
    Post edited by sK0pe on
  • Yeah I think the coin jam brute force only works like the above on the small data set lol.
  • I've been using Go some at work for some concurrent stuff. There are some stuff it does terribly, but for most of the stuff I want its pretty awesome.
  • Has anyone migrated to using Atom as their primary text editor?

    Looks pretty interesting, I haven't had the time recently as I had done the majority of a front end + back end, plus a bit of OpenGL and low level networks programming in Sublime Text and Vim.

    Seems really useful if I can go cross platform and bring appropriate linters and all the great git plugins.

    There is a package to write in Vim style as well which I have become accustomed to when writing most things. So far the only good Vim emulation I've used are in the IntelliJ IDEs.

    If I can get one text editor to rule them it all it would be great. Vim is great and all but bundle handling can be annoying.

    Also only recently started switching to ZSH over BASH, saves on quite a bit of typing.

    I should probably also not be messing around so much during exam time but I want to try a few rolling release Linux Distributions, will probably start with Antergos or straight Arch.
    MATATAT said:

    I've been using Go some at work for some concurrent stuff. There are some stuff it does terribly, but for most of the stuff I want its pretty awesome.

    I'm yet to do anything substantial (write anything longer than a snippet) in Go, what are the shortcomings you found?
Sign In or Register to comment.