Jump to content
Search In
  • More options...
Find results that contain...
Find results in...


  • Content Count

  • Joined

  • Last visited


This user doesn't have any awards

About AkaCrabby

  • Title
    Junior Member

Profile Information

  • Gender
  • Location


  • CPU
  • Motherboard
    Gigabyte GA-Z170M-D3H
  • RAM
    G.Skills Ripjaws V 16GB DDR4-2400MHz
  • GPU
    EVGA GTX 950 SC+
  • Case
    Corsair 200R
  • Storage
    Samsung 850 EVO 250GB + 120GB + Seagate Barracuda 1TB
  • PSU
    Corsair CS430
  • Display(s)
    2x BenQ GL2460HM
  • Cooling
    Hyper 212 plus
  • Keyboard
    CMStorm Quickfire Rapid TK w/ blues + KBC Poker II w/ reds
  • Mouse
    SteelSeries Rival 300
  • Sound
    Audio-Technica ATH-M50x
  • Operating System
    macOS Sierra 10.12.2

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. AkaCrabby

    How to select specific non-specific text from a text file?

    Since the order is always going to be the same just use some basic string parsing to get what you want. I'm not sure what this would look like in PHP but in Python you'd do: text = "KBOS 280454Z 21009KT 10SM CLR 20/16 A3004 RMK AO2 SLP171 T02000156 40228014" text_split = text.split() date = text_split[1] winds = text_split[2] visibility = text_split[3] clouds = text_split[4] temp = text_split[5] alimeter = text_split[6]
  2. AkaCrabby

    I hate C++

    No, I know how it works very well. Like many (if not most) universities, my university's computer science program taught it to us very extensively. When I said "I hate object-oriented programming" and "OO already sucks" I didn't mean to imply that OOP is inherently bad (they were unnecessarily ambiguous statements so I've since corrected them). Rather, I meant that the current implementations of OOP are bad. I absolutely agree that the concept behind objects is great and forward-thinking but the implementation of the concept comes at costs far higher than it ever should have been. Objects should have been implemented as an extension of structs and not a completely separate thing. Perhaps more over though, programmers today are being taught and encouraged to write all of this boilerplate code even when they're creating tiny little static objects but a struct would have gotten them what they wanted with far less code and far less complexity. If I can cheerlead for Golang for a bit, I think they've done objects almost perfectly. Copying from sp13: type rect struct { width int height int } func (r *rect) area() int { return r.width * r.height } func main() { r := rect { width: 10, height: 5 } fmt.Println("area: " , r.area()) }
  3. AkaCrabby

    I hate C++

    I don't like C++ either but it's because I hate object-oriented programming. OO already sucks but all of the obnoxious boilerplate code that comes with it makes it suck a lot more. Edit: I don't hate OOP because I hate objects. Rather, I hate OOP because I hate the current implementations. See: here
  4. AkaCrabby

    First Langauge

    Echoing this. I started off learning Python but it wasn't until I started learning C++ that I really got a grasp of what exactly I was doing. Certainly a bit harder but definitely worth it.
  5. AkaCrabby

    Is Django good?

    It doesn't have a first-class, built-in ORM like Django does but it does have really great support for SQLite and SQLAlchemy. For templating, it defaults to Jinja2 but you can use Django, Mako, and Chameleon as well.
  6. AkaCrabby

    Is Django good?

    I only have experience making smaller websites and APIs and that's exactly why I use it. All of the routes and logic can be built into a single file. In that respect, it's very barebones and puts the dependence on you to implement the extra stuff you might need. I think it might also be lighter and easier to run but I'm not 100% sure. Miguel Grinberg has a pretty wonderful "hello world" series that covers a lot of Flask's strengths: http://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-i-hello-world This is an example of a fully functioning website with a JSON API. from flask import Flaskfrom flask import jsonifyapp = Flask(__name__)@app.route('/')def index(): return 'Hello World!' @app.route('/api')def api(): return jsonify(response='Hello world!')if __name__ == '__main__': app.run()
  7. AkaCrabby

    Is Django good?

    Personally, I prefer Flask. It's lighter weight and much more simplistic to use.
  8. C and/or C++ coupled with QT (preferably) or GTK. Linux doesn't have an official user-interface library that's as first class as you're going to get. Java works but it's incredibly annoying to use a Java program.
  9. AkaCrabby

    New to coding

    OS X comes with Clang pre-installed. Install Sublime text or Vim and start learning C and/or C++
  10. This is from my into to CS class freshman year so it's pretty rough but it works. Add in some validation loops and make it less crappy. def convert_13(): isbn = input("Enter ISBN-13: ") isbn2 = isbn isbn = isbn.replace("-", "") # Remove "978-" and check digit isbn = isbn[3:-1] total = 0 # Calculate the check digit for i in range(len(isbn)): char = int(isbn[i]) multi = i + 1 total += char * multi remainder = total % 11 # Roman numeral stuff if remainder == 10: output = x else: output = str(remainder) # ISBN-10 correct_isbn = isbn2[4:-1] + output return correct_isbn
  11. AkaCrabby

    Programming Macros?

    Since you're using Sublime I would suggest look into snippets! They're like key macros in terms of functionality but the total number you can have isn't limited to the number of key combinations you can make with your keyboard (so you can use a 60% or 40% like a real programmer ). Once setup snippets allows you to type a string, say "fun()," and then you either get a list of options to complete to or it'll autocomplete to something more valuable like "function() { }" with your cursor inside the parenthesis. You can also setup snippets which automatically inject the output from a command into a portion, it's a really wonderful and powerful tool. This video's directed towards Vim but everything covered can be done in Sublime text. http://vimcasts.org/episodes/meet-ultisnips/
  12. Python and Bash were were my first languages, then I learned Java and C++.
  13. AkaCrabby

    What Browser Add-Ons Do You Use?

    Add-ons I can't live without: uBlock Origin Lastpass (Transitioning to Keepass though) BetterTTV RES (Reddit Enhancement Suite) Twitch Now Steam Enhanced JSON and XML formatters
  14. I prefer implicit. It's nicer looking, makes the code easier to traverse, and it allows you to much more easily hit those 80 character line limits. That being said though, I'm not going to really complain about being explicit if being implicit would be against the style guide; consistency is much more important. No space between the conditional and the open curly brace? You heretic!
  15. AkaCrabby

    What is Python used for?

    There's a lot of stuff it can be used for but the area where it really shines is scientific computing. Python fills a really big gap for scientists that want to use computers for computing but don't want to spend months or years learning how to program. NumPy, SciPy, Matplotlib, NLTK, and PIL/Pillow are a few of the really popular libraries that brings them to the language.