As was foretold, we've added advertisements to the forums! If you have questions, or if you encounter any bugs, please visit this thread: https://forums.penny-arcade.com/discussion/240191/forum-advertisement-faq-and-reports-thread/

cmd /v:on /c "set TITLE=Programming Thread & echo !TITLE!"

145791099

Posts

  • Alistair HuttonAlistair Hutton Dr EdinburghRegistered User regular
    edited September 2012
    One thing I will give Actionscript is that with its Date object you can add/subtract integers on any of the separate fields and it will roll the date correctly.

    Everything else is shit. Two different and incompatible date parsing methods. No support for parsing ISO date formats. Intrinsic assumption of American format dates. Built in DateFormatters work on the local time and not UTC time fields. etc. etc. e t fucking c.

    And then the libraries this project has. Ugggghaaaaaaah. Kludge after kludge after kludge to make up for the fact that they don't use the UTC fields that exist on the Date object. It makes me weep.

    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.
  • EtheaEthea Registered User regular
    Echo wrote: »
    I've been running that new font for a few days. I think I like it. Went from 12pt Menlo to 13pt Source Code Pro, it's smaller with an increased line height.

    Screen%20Shot%202012-09-26%20at%2012.27.09.png

    I switched over to Source Code pro at font size 11, and I am really enjoying it. I was running I think Menlo at 12 or 13 too. A smaller but easier to read font is a win win, now I can have four panes of code open at once.

    As far of conferences go I feel that they go with the domain I work in. We do so much SBIR work, and getting published increases your ability to get phase 2's and more SBIR's. Plus conferences in my domain are a great place to push your product by presenting a poster, paper or tutorial.

    For example the SuperComputing trip costs are mainly covered by ACM since I am co presenting a tutorial.

  • Gilbert0Gilbert0 North of SeattleRegistered User regular
    Date / Time is the WORST. Everyone who just adds 24 hrs is wrong half the year too if you need an exact hour. Daylight savings is a goose to get around. Especially when you have keys on tables and you can't have duplicates in time. Fall back is so crappy (stupid two 1 am's).

    Our application has our own time system to keep track of it. Segment 1 = Jan 1, 1900 1 am, 2 = Jan 1, 1900 2 am....etc. A lot like the millisecond unix time but by hour instead. Reading it is awful too. Quick, when is 984935? or how about when a you need a report for the month of January and there is no months, just 984935. We do have functions that go back and forth but it's awful for troubleshooting.

  • Alistair HuttonAlistair Hutton Dr EdinburghRegistered User regular
    Use UTC or die by my fiery hands!

    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.
  • PhyphorPhyphor Building Planet Busters Tasting FruitRegistered User regular
    TAI 4 lyfe!

  • DehumanizedDehumanized Registered User regular
    i just measure all time in ticks since unix epoch what's the worst that could happen :rotate:

  • bowenbowen How you doin'? Registered User regular
    Oh you're using PHP?

    not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
  • PhyphorPhyphor Building Planet Busters Tasting FruitRegistered User regular
    bowen wrote: »
    Oh you're using PHP *nix?

  • GnomeTankGnomeTank What the what? Portland, OregonRegistered User regular
    I hate date and times. I hate them because it appears that every other programmer in the universe is apparently completely shit at dealing with them.

    No, you cannot just add 24 fucking hours in milliseconds onto this date at midnight to get midnight next day.
    Parsing a UTC date string and sticking the values into the local time field on an object is not how you get fucking UTC date.

    Aaaaaaaargh.

    This is precisely why I am an anal dick head about all date manipulation being in UTC in my apps, and only converting to local for display. Usually using a WPF converter right at the bind site.

    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
  • GnomeTankGnomeTank What the what? Portland, OregonRegistered User regular
    I use Consolas in Sublime Text, just like visual studio. I also use the same theme (Son of Obsidian for VS and Grandson of Obsidian for ST2).

    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
  • Jimmy KingJimmy King Registered User regular
    And then there were two problems:
    re.compile(r'\/O\.NEW\.(?P<office_id>[A-Z]{4})\.[A-Z]{2}\.[A-Z]{1}\.(?P<etn>\d{4})\.\d{6}T\d{4}Z-\d{6}T\d{4}Z\/')

    Echo
  • bowenbowen How you doin'? Registered User regular
    Oh hey is that regex? Looks like you're trying to parse XML.

    not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
  • EchoEcho ski-bap ba-dapModerator mod
    *hands bowen the rolled-up newspaper*

  • bowenbowen How you doin'? Registered User regular
    Don't worry I've got a knife, it's all good.

    not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
  • InfidelInfidel Heretic Registered User regular
    bowen wrote: »
    Oh hey is that regex? Looks like you're trying to parse XML.

    When I read this I pictured bowen popping up in an adjacent cubicle, MS Clippy style.

    OrokosPA.png
  • DehumanizedDehumanized Registered User regular
    i don't use regex often, but when i do, it's to parse some XML

  • GnomeTankGnomeTank What the what? Portland, OregonRegistered User regular
    Why would anyone do this with libraries like TinyXML out there? Or if you're in a language like Java or C#, there are entire namespaces/packages dedicated to simple and DOM based XML parsing.

    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
  • bowenbowen How you doin'? Registered User regular
    Infidel wrote: »
    bowen wrote: »
    Oh hey is that regex? Looks like you're trying to parse XML.

    When I read this I pictured bowen popping up in an adjacent cubicle, MS Clippy style.

    ZvMrI.png

    not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
    GnomeTankkimeEchoSaerisiTunesIsEvilInfidelJHunzNightslyrThe Rocking MSporkAndrewJoe KTofystedeth
  • SaerisSaeris Borb Enthusiast flapflapflapflapRegistered User regular
    Yes.

    borb_sig.png
  • Jimmy KingJimmy King Registered User regular
    edited September 2012
    bowen wrote: »
    Oh hey is that regex? Looks like you're trying to parse XML.

    Nope, I'm pulling a P-VTEC code out of a National Weather Service advisory and then extracting a couple of specific values from that which allow me to uniquely identify the advisory... which should actually be made available elsewhere from the API I'm using, but it's not, so this is the solution for now. It's just plain old strings and blobs of text, though. No XML, no HTML, just plain old text.

    I see what made you think xml. That's actually python awesomeness to name the groups I've got marked.

    Jimmy King on
  • DehumanizedDehumanized Registered User regular
    edited September 2012
    Welcome to the world of Java :rotate: Let's begin caring for your inputs.
    >Fuck yes.
    Each input has a simple format of markup. It is very important that you parse this markup correctly.
    My god. What have you done. You have tried to use regex.
    Look what your careless hands have wrought.
    With that regex, these ten nodes cannot be decoded.
    Each moment this unnatural beast lives is like a thousand years of misery.
    Look in its Document Type Definition. It longs for death.
    Select the pistol, and then, select your XML.
    >No. I... I don't want to!
    Select the pistol, and then, select your XML.

    Dehumanized on
    EchobowenadmanbSaerisASimPersonNightslyragoajystaelTofystedeth
  • Monkey Ball WarriorMonkey Ball Warrior A collection of mediocre hats Seattle, WARegistered User regular
    GnomeTank wrote: »
    I use Consolas in Sublime Text, just like visual studio. I also use the same theme (Son of Obsidian for VS and Grandson of Obsidian for ST2).

    Downloaded grandson of obsidian, and I approve! It's pretty similar to Blackboard, although it seems to change less things to a different color. Like if I have a function definition
    void Foo::Bar() {
    

    Blackboard would make Foo::Bar orange, but GSoO leaves it white.

    However the overall color scheme is easier on tired eyes and it still does the important things like pointing out string literals or important keywords like "new". So I think I'll stick with it for a while.

    "I resent the entire notion of a body as an ante and then raise you a generalized dissatisfaction with physicality itself" -- Tycho
  • GnomeTankGnomeTank What the what? Portland, OregonRegistered User regular
    One of the main reasons Obsidian is easy on the eyes is the background color. You'll notice it's not black, but a very dark gray/brown.

    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
  • EchoEcho ski-bap ba-dapModerator mod
    One day I'll work on that CSS-to-Textmate-theme idea I had. Shouldn't be too hard. Because editing a Textmate theme by hand is a big PITA.

    Then I can write a theme in LESS/SASS which is all kinds of <3.

  • BarrakkethBarrakketh Registered User regular
    edited September 2012
    Jimmy King wrote: »
    bowen wrote: »
    Oh hey is that regex? Looks like you're trying to parse XML.

    Nope, I'm pulling a P-VTEC code out of a National Weather Service advisory and then extracting a couple of specific values from that which allow me to uniquely identify the advisory... which should actually be made available elsewhere from the API I'm using, but it's not, so this is the solution for now. It's just plain old strings and blobs of text, though. No XML, no HTML, just plain old text.

    I see what made you think xml. That's actually python awesomeness to name the groups I've got marked.
    You should really be using the re.VERBOSE flag and splitting that crap up (commenting as needed).

    Barrakketh on
    Rollers are red, chargers are blue....omae wa mou shindeiru
  • Monkey Ball WarriorMonkey Ball Warrior A collection of mediocre hats Seattle, WARegistered User regular
    GnomeTank wrote: »
    One of the main reasons Obsidian is easy on the eyes is the background color. You'll notice it's not black, but a very dark gray/brown.

    Well it only really became a thing now that I'm actually looking at the text editor for ~8hrs a day, as opposed to school where I'd code for 1-2 hrs and play TF2 for an hour and go back.

    "I resent the entire notion of a body as an ante and then raise you a generalized dissatisfaction with physicality itself" -- Tycho
  • EtheaEthea Registered User regular
    I use zenburn on QtCreator and Zenburnesque on Sublime.

  • GnomeTankGnomeTank What the what? Portland, OregonRegistered User regular
    Zenburn would be my next choice if I didn't like Obsidian so much.

    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
  • EtheaEthea Registered User regular
    I like the lighter background and more pastel color pallet.

  • Monkey Ball WarriorMonkey Ball Warrior A collection of mediocre hats Seattle, WARegistered User regular
    I cannot get behind the red on light grey. The text looks like it's not even on the screen, but floating a few millimeters in front of it.

    To each their own.

    "I resent the entire notion of a body as an ante and then raise you a generalized dissatisfaction with physicality itself" -- Tycho
  • EchoEcho ski-bap ba-dapModerator mod
    Great to spend 20 minutes staring before you notice that this CSS parser gem doesn't raise an error if a file doesn't exist.

    ...and that's why I was trying to parse CSS from an empty string.

  • Jimmy KingJimmy King Registered User regular
    Barrakketh wrote: »
    Jimmy King wrote: »
    bowen wrote: »
    Oh hey is that regex? Looks like you're trying to parse XML.

    Nope, I'm pulling a P-VTEC code out of a National Weather Service advisory and then extracting a couple of specific values from that which allow me to uniquely identify the advisory... which should actually be made available elsewhere from the API I'm using, but it's not, so this is the solution for now. It's just plain old strings and blobs of text, though. No XML, no HTML, just plain old text.

    I see what made you think xml. That's actually python awesomeness to name the groups I've got marked.
    You should really be using the re.VERBOSE flag and splitting that crap up (commenting as needed).
    Oh, nice. I'll definitely use that to break this up a bit. I've never actually read the re docs closely since I'm comfortable with regex and so don't usually need to refer to them and rarely need to use regex these days anyway.

  • EchoEcho ski-bap ba-dapModerator mod
    It is known.

    A3-IJxpCQAEk1J3.png:large

    ASimPerson
  • GnomeTankGnomeTank What the what? Portland, OregonRegistered User regular
    Camel case is awesome. I would MuchRatherReadThis, than_have_to_read_this, orevenworsethis.

    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
  • InfidelInfidel Heretic Registered User regular
    It is much easier to type as well.

    OrokosPA.png
  • SaerisSaeris Borb Enthusiast flapflapflapflapRegistered User regular
    The Chromium style guide insists_on_using_underscores, so trying to read through their changelogs bothers me more than it should.

    borb_sig.png
  • Monkey Ball WarriorMonkey Ball Warrior A collection of mediocre hats Seattle, WARegistered User regular
    Of course that does not mean that VariablesThatDescribeWhatTheyAreInFarTooMuchDetail are such a great idea, either.

    I've seen way too much of that, especially in C# code.

    "I resent the entire notion of a body as an ante and then raise you a generalized dissatisfaction with physicality itself" -- Tycho
  • EchoEcho ski-bap ba-dapModerator mod
    edited September 2012
    That seems to be par for the course in java :rotate:

    Echo on
  • agoajagoaj Top Tier One FearRegistered User regular
    I don't get Java's aversion to operator overloading when they support string + string

    ujav5b9gwj1s.png
  • SageinaRageSageinaRage Registered User regular
    So I'm going to teach myself rails, but I need some kind of project to work on to do it. What would be a good thing to build that would teach me everything rails can do?

    sig.gif
This discussion has been closed.