Club PA 2.0 has arrived! If you'd like to access some extra PA content and help support the forums, check it out at patreon.com/ClubPA
The image size limit has been raised to 1mb! Anything larger than that should be linked to. This is a HARD limit, please do not abuse it.
Our new Indie Games subforum is now open for business in G&T. Go and check it out, you might land a code for a free game. If you're developing an indie game and want to post about it, follow these directions. If you don't, he'll break your legs! Hahaha! Seriously though.
Our rules have been updated and given their own forum. Go and look at them! They are nice, and there may be new ones that you didn't know about! Hooray for rules! Hooray for The System! Hooray for Conforming!

[Programming] Reinventing equality, one language at a time

19293959798100

Posts

  • OrcaOrca Registered User regular
    Spoit wrote: »
    Orca wrote: »
    Mugsley wrote: »
    Programmers: Is the new Humble Bundle legit worth? Just on a cursory glance, it seems at least the BtA tier is good just for general knowledge (I know I've asked you guys about other bundles in the past but I've been gunshy about grabbing; this one includes videos so I'm giving it heavier consideration).

    I've programmed in FORTRAN and I've watched some videos of a guy teaching how to program in C++.

    I'd need to see more of the curriculum and how it's taught to say anything useful about the courses. The course outlines don't seem terrible, though they do seem centered around the frameworks you're intended to use, which does make me look askance at them.

    The price is cheap enough that if they suck it's not the end of the world.

    How about the O'reilly cookbook bundle?

    I haven't seen an O'Reilly cookbook for embedded C++, so I can't give you any guidance there. :D

    The 2012 issue of Fornax. | Steam and Origin: Espressosaurus
  • halkunhalkun Registered User regular
    Here's some fun. I decided to port Basic to the NES :)
    lC2aWhy.png

    The terminal is only a third done. I have to still write the control codes (Which is why you see CR/LF expressed as characters). I also have a non functional cursor, but it's there.
    Sadly, the original person who wrote the 6502 Basic died in 2013. The last license it had was free for non-commercial use, but it appears that the copyright is now abandoned.

    wVo0Rgr.png
    AiouahtmDisruptedCapitalist
  • TelMarineTelMarine Registered User regular
    Anyone know any engineering books that are conducive to reading on a train? I have a decently long train commute and I've found reading books works well. I figured I could also take advantage and try to increase my knowledge too. I'll be standing most of the time, so laptops and anything interactive (like writing code) is out. Topics I'd be interested in are devops and tools, java, microservice architecture, system design for web applications.

    3ds: 4983-4935-4575
  • zeenyzeeny Registered User regular
    edited February 9
    Get Kleppman's Designing Data-Intensive Applications.

    Edit: Do not read books about devops. Learn by doing.

    zeeny on
  • TelMarineTelMarine Registered User regular
    zeeny wrote: »
    ...
    Edit: Do not read books about devops. Learn by doing.

    Agree, I just wanted supplementary material.

    3ds: 4983-4935-4575
  • thatassemblyguythatassemblyguy RESIST. Registered User regular
    zeeny wrote: »
    Get Kleppman's Designing Data-Intensive Applications.

    Edit: Do not read books about devops. Learn by doing.

    Disagree with the edit. Do both. Books on things that are heavy on process or flow are great to read about. Include some doing/prototyping to understand what was read.

    I think the attitude that someone shouldn’t read about what has already been done is what gets a lot of SV into the problems it has now with “Not Invented Here” syndrome. I’ve literally watched organizations lose billions of dollars because some devops teams refuse to purchase turnkey solitons for some parts of infrastructure. Not everyone is Alphabet with the money to staff up multiple talented teams to run DevOps as an R&D like environment while also having prod remain rock solid to the external world.

    DrovekGnomeTank
  • zeenyzeeny Registered User regular
    zeeny wrote: »
    Get Kleppman's Designing Data-Intensive Applications.

    Edit: Do not read books about devops. Learn by doing.

    Disagree with the edit. Do both. Books on things that are heavy on process or flow are great to read about. Include some doing/prototyping to understand what was read.

    Allow me to please double down, most certainly don't ever read a fucking book on Devops. Read case studies, insiders articles, documentation, try to work and replicate larger or smaller setups you find interesting, but if you want to read books, the books that will help you with establishing/moving away from devops are not at all related to devops itself.
    I think the attitude that someone shouldn’t read about what has already been done is what gets a lot of SV into the problems it has now with “Not Invented Here” syndrome.

    Such an attitude doesn't exist in software development and most definitely isn't the cause of the "not invented here". Lack of experience is not something that can easily be solved with books, especially when the people involved in the decision process *believe* they can do better. The cause of the syndrome is inexperienced/bad management, not "developers lacking curiosity".
    ' I’ve literally watched organizations lose billions of dollars because some devops teams refuse to purchase turnkey solutions for some parts of infrastructure. Not everyone is Alphabet with the money to staff up multiple talented teams to run DevOps as an R&D like environment while also having prod remain rock solid to the external world.

    And I've seen companies purchase turnkey solutions that would not address the cause of the problem they are trying to solve. Both happen. There is no standard protection from it outside of having the right people making the right decision.

  • DrovekDrovek Registered User regular
    TelMarine wrote: »
    Anyone know any engineering books that are conducive to reading on a train? I have a decently long train commute and I've found reading books works well. I figured I could also take advantage and try to increase my knowledge too. I'll be standing most of the time, so laptops and anything interactive (like writing code) is out. Topics I'd be interested in are devops and tools, java, microservice architecture, system design for web applications.

    The DevOps Handbook and Seeking SRE are two DevOps books I would recommend (well, SRE is not exactly DevOps, but you'll see some value in those lessons.)

    (Yes, you can read about DevOps. But honestly the best DevOps teachers are books like The Machine that Changed the World, and other TPS related books.)

    steam_sig.png
    thatassemblyguy
  • jjae2123jjae2123 Registered User regular
    This is late to the interview train, but in the whiteboard interview for my previous job I was so nervous I wrote the number 7 backwards on the board while writing out a numbered outline of a system architecture.

    LD50DisruptedCapitalistjaziekDrovekSpawnbrokerSporkAndrewCampyMahnmut
  • schussschuss Registered User regular
    Read and do, to validate/invalidate the written material in your own space. Everything makes you better.

    thatassemblyguy
  • thatassemblyguythatassemblyguy RESIST. Registered User regular
    In internal DSL compiler news, I’ve worked out the BNF for this grammar.

    It’s a bit annoying. They have some points where an identifier can be ambiguous but not generalizable so there’s some conflicts unless the identifier pattern is made part of some of the other tokens when tokenizing. Definitely makes things slower when generalizing the grammar.

    I don’t think I’ll be able to change it yet, but I think the goal will be to define a crisper grammar for this DSL when the business hits a lul in work.

  • OrcaOrca Registered User regular
    Man, I'd love to do that kinda thing.

    In my own news, I made the uncomfortable discovery that our presumed-linear system in the operating range...isn't.

    This was news to everybody from the mechanical team on down.

    WELP.

    Time to throw out the current control system and implement a new one!

    (almost certainly we won't do this, but there's going to be some harsh constraints around how we operate the damned thing to make sure we keep it in at least a quasi-linear region).

    The 2012 issue of Fornax. | Steam and Origin: Espressosaurus
    thatassemblyguy
  • iTunesIsEviliTunesIsEvil Registered User regular
    Just ran into a bug in a co-worker's code, and I'm honestly surprised this was valid syntax in C#:
    var sb = new StringBuilder();
    if (condition)
      sb.Append(new string(' ', 11));
    {
      sb.Append(boxVal);
      total += boxVal;
    }
    

    The curly braces there are missing an "else", so the data in the StringBuilder was offset incorrectly, and the total variable was added to.

    It ran both of the Append calls, which, since the syntax is valid, is fine; I just didn't think that was valid syntax. C# supports wrapping random blocks of code in braces without a ... control keyword? Hmmmm... I can't decide if I'm missing something obvious (not putting together syntax I already know is legit to get to this), or if this is some sort of new-ish behavior. I'm going with the former, 'cause I forgot my coffee and banana this morning so I'm operating in hangry mode. :?

  • EchoEcho Moderator mod
    That's how you get Apple's SSL bug.

    Echo wrote: »
    Let they who have not posted about their balls in the wrong thread cast the first stone.
    iTunesIsEvilthatassemblyguykimea5ehren
  • bowenbowen How you doin'? Registered User regular
    Technically the curly braces don't belong to the if.

    If belongs to the sp.Append line, the curly braces are their own little fiefdom, and that's totally legal in pretty much any C based language.

    You can use curly braces to give yourself chunks of code it is not syntactically relevant to anything.

    To better illustrate what's going on let me add some spaces and more braces
    var sb = new StringBuilder();
    if (condition)
    {
      sb.Append(new string(' ', 11));
    }
    
    //this is not part of the if/else conditional pairing
    //it will evaluate every time.
    {
      sb.Append(boxVal);
      total += boxVal;
    }
    

    Ladies.
  • bowenbowen How you doin'? Registered User regular
    This also "scopes" things, so variables created inside are out of scope once outside. Not sure if C# does the scoping thing, but I'm fairly positive C still does.

    Ladies.
    DrovekmightyjongyoDehumanizedOrca
  • iTunesIsEviliTunesIsEvil Registered User regular
    bowen wrote: »
    Technically the curly braces don't belong to the if.

    If belongs to the sp.Append line, the curly braces are their own little fiefdom, and that's totally legal in pretty much any C based language.

    You can use curly braces to give yourself chunks of code it is not syntactically relevant to anything.

    To better illustrate what's going on let me add some spaces and more braces
    var sb = new StringBuilder();
    if (condition)
    {
      sb.Append(new string(' ', 11));
    }
    
    //this is not part of the if/else conditional pairing
    //it will evaluate every time.
    {
      sb.Append(boxVal);
      total += boxVal;
    }
    

    I didn't need the code re-written to help me understand, I was aware of everything other than the bolded bit. I know the braces don't belong to the if; they were supposed to belong to an "else" that was left out. Hence my assumption/wondering re: "C# supports wrapping random blocks of code in braces". Apologies if that sounds defensive. I saw what it was doing; just hadn't used or seen it done before and was a little surprised I guess.

    And yep, the code in the braces is scoped to just within 'em like it would be in C.

  • bowenbowen How you doin'? Registered User regular
    Oh the way you were surprised by it being valid syntax I thought you were saying it was some sort of implied else. My bad.

    Ladies.
  • tyrannustyrannus Registered User regular
    for my operating systems class I'm making my own shell

    *vibrates*

    also I'm learnign about Prim's Spanning Tree and having to do this shit without like, structs or something would be ridiculous. objects are fuckin sweet

  • EchoEcho Moderator mod
    tyrannus wrote: »
    also I'm learnign about Prim's Spanning Tree and having to do this shit without like, structs or something would be ridiculous. objects are fuckin sweet

    That's an interesting one. IRC servers use a minimum spanning tree to determine how to route traffic to other servers.

    Echo wrote: »
    Let they who have not posted about their balls in the wrong thread cast the first stone.
  • PhyphorPhyphor Building Planet Busters Tasting FruitRegistered User regular
    Echo wrote: »
    That's how you get Apple's SSL bug.

    That sort of shit really should get caught in code review though

    Magic Box
    Academician Prokhor "Phyphor" Zakharov, Chief Scientist of China, Provost of the University of Planet - SE++ Megagame
    EchoMonkey Ball Warriorthatassemblyguykime
  • EchoEcho Moderator mod
    Phyphor wrote: »
    Echo wrote: »
    That's how you get Apple's SSL bug.

    That sort of shit really should get caught in code review though

    I like how Go handles it. No braces, no compiling.

    Echo wrote: »
    Let they who have not posted about their balls in the wrong thread cast the first stone.
    EchoMonkey Ball Warriorthatassemblyguykimedjmitchella
  • Monkey Ball WarriorMonkey Ball Warrior A collection of mediocre hats Seattle, WARegistered User regular
    Your IDE should be configured to blink big red blinking warnings with sirens if you write an if statement without brackets in a language that actually allows such blasphemies.

    "I resent the entire notion of a body as an ante and then raise you a generalized dissatisfaction with physicality itself" -- Tycho
    bowenInfidelOrcathatassemblyguykimeSporkAndrewLilnoobs
  • Alistair HuttonAlistair Hutton Dr EdinburghRegistered User regular
    edited February 15
    Your IDE should be configured to blink big red blinking warnings with sirens if you write an if statement without brackets in a language that actually allows such blasphemies.

    Style guides that recommend bracel less one line ifs should be shredded. Yes, they do exist.

    Alistair Hutton on
    I have a thoughtful and infrequently updated blog about games http://whatithinkaboutwhenithinkaboutgames.wordpress.com/

    I made a game, it has penguins in it. It's pay what you like on Gumroad.

    Currently Ebaying Nothing at all but I might do in the future.
    Orca
  • Monkey Ball WarriorMonkey Ball Warrior A collection of mediocre hats Seattle, WARegistered User regular
    Your IDE should be configured to blink big red blinking warnings with sirens if you write an if statement without brackets in a language that actually allows such blasphemies.

    Style guides that recommend bracel less one line ifs should be shredded. Yes, they do exist.

    Burn the building down, salt the earth, send all the devs to reeducation camps.

    "I resent the entire notion of a body as an ante and then raise you a generalized dissatisfaction with physicality itself" -- Tycho
  • KakodaimonosKakodaimonos Registered User regular
    edited February 15
    If everyone used K&R style braces, we'd have less problems.

    Kakodaimonos on
    GnomeTank
  • Alistair HuttonAlistair Hutton Dr EdinburghRegistered User regular
    If everyone used K&R style braces, we'd have less problems.

    K&R excludes braces on single statement ifs!

    I have a thoughtful and infrequently updated blog about games http://whatithinkaboutwhenithinkaboutgames.wordpress.com/

    I made a game, it has penguins in it. It's pay what you like on Gumroad.

    Currently Ebaying Nothing at all but I might do in the future.
    a5ehren
  • Monkey Ball WarriorMonkey Ball Warrior A collection of mediocre hats Seattle, WARegistered User regular
    I think he means more that annoying practice of putting opening curly brackets on their own line.

    I mean, I don't like it, I don't use it, Go doesn't even allow it, but it's not something I'm particularly worried about either way. It's some tabs/space style nonsense that isn't worth arguing about.

    "I resent the entire notion of a body as an ante and then raise you a generalized dissatisfaction with physicality itself" -- Tycho
  • UselesswarriorUselesswarrior Registered User regular
    Your IDE should be configured to blink big red blinking warnings with sirens if you write an if statement without brackets in a language that actually allows such blasphemies.

    Style guides that recommend bracel less one line ifs should be shredded. Yes, they do exist.

    I used to be on the fence about this, I would used braces for multi line ifs, but for the occasional single line if I would omit. A colleague of mine changed my mind by framing it as conditional being a very important part of the code, so you should give them the space they need to be clearly important.

    I liked that and I advocate for always multi-line bracketed if blocks.

    There is also the whole anti-if movement, https://francescocirillo.com/pages/anti-if-campaign.

    Hey I made a game, check it out @ http://ifallingrobot.com/. (Or don't, your call)
  • SaerisSaeris Borb Enthusiast flapflapflapflapRegistered User regular
    Your IDE should be configured to blink big red blinking warnings with sirens if you write an if statement without brackets in a language that actually allows such blasphemies.

    Style guides that recommend bracel less one line ifs should be shredded. Yes, they do exist.

    The Linux kernel style guide being one such example. https://www.kernel.org/doc/html/v4.16/process/coding-style.html#placing-braces-and-spaces

    borb_sig.png
  • TelMarineTelMarine Registered User regular
    Shouldn't styles like this be moot with IDEs having auto re-formatting? Code the way you like, then re-format.

    3ds: 4983-4935-4575
  • JasconiusJasconius sword criminal mad onlineRegistered User regular
    bracelessness is the one thing about python i would happily give away

    i like braces so much i insist they be on their own line, dont @ me

    Try EVE Online with my referral code, and I'll like you a little bit: https://www.eveonline.com/signup/?invc=86622db9-a6f9-41e8-b846-c305f625b55b
    templewulfkimeA Kobold's Kobold
  • GnomeTankGnomeTank Registered User regular
    Own line braces are such a waste of space argleblargleflargle.

    Seriously though, just pick a style and stay consistent. I use K&R braces everywhere because it's my preference, but if I work in someone else's code base, I use their style.

    Sagroth wrote: »
    Oh c'mon FyreWulff, no one's gonna pay to visit Uranus.
    Steam: Brainling, XBL / PSN: GnomeTank, NintendoID: Brainling, FF14: Zillius Rosh SFV: Brainling
    Orca
  • templewulftemplewulf The Team Chump USARegistered User regular
    I use braces even on single line ifs. Ain't nobody gonna trick me with whitespace.

    Twitch.tv/FiercePunchStudios | PSN | Steam | Discord | SFV CFN: templewulf
    EchokimePeewithatassemblyguyGnomeTankOrcaLilnoobsDisruptedCapitalistdjmitchellaA Kobold's Kobold
  • DehumanizedDehumanized Registered User regular
    honestly for single line ifs my preference is braces and no line breaks at all
    if (foo) { bar(); }
    

    but it's 2019 and i'm never manually formatting code ever again. my tools handle all this stuff for me, automatically, upon commit, and whatever they do is fine

    OrcaMonkey Ball Warrior
  • halkunhalkun Registered User regular
    edited February 17
    Hey, I want to contribute to a Github project and I don't know how to do it right I need some help. I'm trying branching for the first time.
    I forked a project and I opened it in visual studio.
    I made a branch called "VRM_english_assist"
    I'm editing that branch and now I want to upload my changes back again, but I'm not understanding how it works.
    I went into Team explorer and made a commit
    Then I tried to push
    I have a warning that "This current branch does not track the remote branch, push your changes to a new branch on the origin remote and set the upstream branch"
    I pressed "Push"
    I got this error:
    C:\Users\halku\Source\Repos\VRM_IMPORTER_for_Blender2_8
    Checked out VRM_english_assist
    Commit 316cee38 created locally in repository C:\Users\halku\Source\Repos\VRM_IMPORTER_for_Blender2_8
    Pushing VRM_english_assist
    Error encountered while pushing branch to the remote repository: Git failed with a fatal error.
    unable to access 'https://github.com/iCyP/VRM_IMPORTER_for_Blender2_8/': The requested URL returned error: 403
    Pushing to https://github.com/iCyP/VRM_IMPORTER_for_Blender2_8

    Access error? Am I doing this right?

    halkun on
    wVo0Rgr.png
  • PhyphorPhyphor Building Planet Busters Tasting FruitRegistered User regular
    edited February 17
    You need to tell it what your main branch is

    Not sure how to in the tools you use but you need to do a

    git branch --set-upstream-to remote/branch

    Then git status should show your_branch 1 change ahead of remote/branch

    git branch -a
    will show you all the available remote branches

    Phyphor on
    Magic Box
    Academician Prokhor "Phyphor" Zakharov, Chief Scientist of China, Provost of the University of Planet - SE++ Megagame
    templewulf
  • halkunhalkun Registered User regular
    edited February 17
    I'm using visual studio and not the command line
    The main branch is here
    https://github.com/iCyP/VRM_IMPORTER_for_Blender2_8
    I clicked on fork while I was logged into github and it behaved differently now
    Now I have a copy of the repo in my repo
    https://github.com/joshuanwalker/VRM_IMPORTER_for_Blender2_8

    I kinda wanted to connect to *his* repo and edit *his* files. Do I edit my own version and then push from one repo to the other? This is a little confusing...

    ==EDIT==
    found a walkthough
    https://github.com/firstcontributions/first-contributions/blob/master/github-windows-vs2017-tutorial.md

    I had some assumptions wrong, I thought I could just log in and start editing things. Turns out you have to make changes in your own repo and then ask the person to copy your changes into their code. Got it.

    halkun on
    wVo0Rgr.png
  • GnomeTankGnomeTank Registered User regular
    edited February 17
    honestly for single line ifs my preference is braces and no line breaks at all
    if (foo) { bar(); }
    

    but it's 2019 and i'm never manually formatting code ever again. my tools handle all this stuff for me, automatically, upon commit, and whatever they do is fine
    if (foo) {
      bar();
    }
    

    Thank you very much.

    I've also become a spaces, 2, shaken not stirred, man.

    Code formatting is such a funny thing. Thankfully formatting tools and things like EditorConfig make it easier than ever to keep a consistent style in a project.

    GnomeTank on
    Sagroth wrote: »
    Oh c'mon FyreWulff, no one's gonna pay to visit Uranus.
    Steam: Brainling, XBL / PSN: GnomeTank, NintendoID: Brainling, FF14: Zillius Rosh SFV: Brainling
    DisruptedCapitalist
  • halkunhalkun Registered User regular
    For me, if the "if" is only one line, I will bracket it up too. It keeps things from "leaking". Also, it reminds me of my BASIC days. If "else" only has one line, I'll bracket it too.
    if (foo) {bar()} else {baz();}
    

    I should be using a ternary, but I can't parse those right

    wVo0Rgr.png
    DisruptedCapitalistkime
This discussion has been closed.