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

Weekend coding

13334353739

Comments

  • Get your ZSH trash out of here. Stop customizing shit. Just get better at using the defaults. Vim bundling is annoying? What bundles do you need? Just use default vim out of the box. Change the font and colors, and you are good to go.
  • sK0pe said:

    Has anyone migrated to using Atom as their primary text editor?
    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.

    Atom is 10/10. Also Antergos is great.
  • Apreche said:

    Get your ZSH trash out of here. Stop customizing shit. Just get better at using the defaults. Vim bundling is annoying? What bundles do you need? Just use default vim out of the box. Change the font and colors, and you are good to go.

    The only bundles I use are auto bracket closure, powerline to tell me what branch I'm editing and a nice looking UI. The last is just fonts and colours.

    The fonts and colours originally were easy to use but most of them have moved to being setup for Vundle or another Vim bundle handler.

    ZSH is objectively better than BASH, it does things that BASH should have implemented years ago but has stayed stagnant.

    Atom is 10/10. Also Antergos is great.

    I'll look forward to installing both, just need to get past exam preparations. Mainly webdev people were recommending Atom to me to the point where I thought it was primarily for Javascript but only checked out the details last night.
  • Yeah, ash is better until something doesn't work because you changed your defaults. Also, just type faster. I've never found bash lacking. Change yourself instead of your software.
  • I'm with you on this, sK0pe; zsh is just plain better. It's ~99% bash-compatible, so all your existing shell knowledge and tricks will still apply. Any scripts you're running should be using a shebang anyway. I use both bash and zsh daily and am equally *capable* in both (largely due to many years of bash experience), but zsh feels much more pleasant to use. It's not that there are things I need to do that I can't do in bash, but that zsh iterates on subtle things that greatly improve my subjective comfort (check out its tab completion as a prime example). It's more of an ergonomic choice than a functional one.

    What failure modes am I overlooking?

    I also use vim daily for sysadmin stuff and am very comfortable/capable with it, but prefer Sublime Text for the bulk of my (mostly python) programming work, for similar (ergonomic) reasons.

    Atom on the other hand...*fuck* this newfangled native app written in JS nonsense. Even if they refuse to learn vim, why can't the kids these days be happy with Sublime Text?

  • Atom on the other hand...*fuck* this newfangled Rock and Roll nonsense. Even if they refuse to learn vim, why can't the kids these days be happy with Sublime Text?

  • I guess we all have our own line to draw :-P
  • I'm not a huge fan of sublime or atom but one thing atom has going for it is open source.
  • I tried Atom for a day, but I was far more productive with emacs. If I'm remembering correctly, navigating directories was a pain in the ass.
  • edited September 2016
    To those who may be interested.

    https://www.edx.org/course/how-win-coding-competitions-secrets-itmox-i2cpx

    Free coding course taught by award winning coder.
    Post edited by Coldguy on
  • The Advent of Code is back for 2016. I'm going to do it in Python, which I'm mostly unfamiliar with.
  • edited December 2016
    okeefe said:

    The Advent of Code is back for 2016. I'm going to do it in Python, which I'm mostly unfamiliar with.

    I actually need to learn a bit of Python but at the same time get up to speed with just programming in general.

    I tried doing some Python stuff and it feels so weird (haven't written Python for anything substantial for 2 years.
    I keep doing semicolons and the compiler doesn't like brackets at places where many other languages like brackets.

    Maybe I'll do every problem in C++ and Python.
    Post edited by sK0pe on
  • edited December 2016
    This is too real.
    Also that advent calendar thing is fun. I just finished the first day. I made a leaderboard. 111686-e01a629f is the join code
    Post edited by SuperPichu on
  • If you join the leaderboard post here with your name.
  • edited December 2016
    Scilab was fun for day 1, but I think I'll stick to it in the future. Maybe I'll pull out my old TI-84 and see if I still know how to work that thing.

    EDIT: I'm Cameron Neville in the leaderboard
    Post edited by Ikatono on
  • I think it's pretty clear who I am on the leaderboard, since it has my forum handle in brackets.
  • I think it's pretty clear who I am on the leaderboard, since it has my forum handle in brackets.

    If you need a cheerleader, I've the legs for a pleat skirt. Can't help anything from there up, though.
  • Leaderboards are rough. Second star at 12:35 AM and placed 254.
  • I think because I taught myself C++, I don't know how to deal with strings as easily as in Java and Python.
    I always resort to writing my own tokeniser (brought about by the first day's problem).

    Is there a more efficient way than this -

    https://gist.github.com/sK0pe/4321f15badec18d572874f4d9c4ad108

    I know I can just use cin.ignore for comma delimited things, but that seems like a bit of a hack
  • A search for splitting strings in C++ turned up stringstream plus getline.
  • okeefe said:

    A search for splitting strings in C++ turned up stringstream plus getline.

    That's definitely a good one when separating by a single character.
    I don't think this approach will work if you have a string delimiter that is made up of more than one character.

    I will remember your one for the majority of cases though.
  • Did today's seem way too easy to anyone else?
  • Super easy with collections.Counter. Yesterday's was also straightforward.
  • Yeah if these don't get significantly harder I'm switching languages.
  • They are all meant to be straight forward, I feel as if it's a refresher or trying out stuff that you're not great at. Like that dude who is doing everything as fast as possible in C++, mostly using multi-threading (and then getting destroyed by someone doing the same in Rust) with what seems like less effort.

  • The occasional easy one isn't too bad, it just helps me focus on mastering Python fundamentals. “Ok, a string is mostly like a list except when it isn't and also it's immutable.” “Huh, what's the quickest way to make a list of empty lists?” “This works, but is there a nicer, more Pythonic way to do it?” Stuff you really learn by doing rather than study.
  • List comprehensions ftw.
  • okeefe said:

    The occasional easy one isn't too bad, it just helps me focus on mastering Python fundamentals. “Ok, a string is mostly like a list except when it isn't and also it's immutable.” “Huh, what's the quickest way to make a list of empty lists?” “This works, but is there a nicer, more Pythonic way to do it?” Stuff you really learn by doing rather than study.

    Yeah usually I'll bang out the C++ solution in a few minutes but I'll fiddle around with the Python solution for a relatively long time.
    I'm still putting brackets and semicolons everywhere though :(.
    Although I/O is really easy.
  • Yeah, the AoC problems so far have all been quite easy so far. That's fine, though; they're still entertaining enough to do.
Sign In or Register to comment.