Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
The MUMPSorceress
Jan 6, 2012


^SHTPSTS

Gary’s Answer

Adhemar posted:

code:
/// <summary>
/// This function should not be called
/// </summary>
[Completely reasonable function that is, in fact, called repeatedly]
:negative:

I wonder if they meant to type "should not be called unless <conditions>" and got interrupted mid-thought only to forget about it.

I know a couple times I've had function headers where I meant to type "should not be called except by functions that have already obtained the lock on <state variable>" or something like that and been interrupted by someone and not noticed the header I never finished until ages later.

Adbot
ADBOT LOVES YOU

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.
"This header should not be called Referer."

Adhemar
Jan 21, 2004

Kellner, da ist ein scheussliches Biest in meiner Suppe.

LeftistMuslimObama posted:

I wonder if they meant to type "should not be called unless <conditions>" and got interrupted mid-thought only to forget about it.

I know a couple times I've had function headers where I meant to type "should not be called except by functions that have already obtained the lock on <state variable>" or something like that and been interrupted by someone and not noticed the header I never finished until ages later.

Maybe it was, "should not be called when Jupiter is in the 7th house". What will happen!? :ohdear:

Soricidus
Oct 21, 2010
freedom-hating statist shill

Adhemar posted:

Maybe it was, "should not be called when Jupiter is in the 7th house". What will happen!? :ohdear:

Beware the IDEs of March

The MUMPSorceress
Jan 6, 2012


^SHTPSTS

Gary’s Answer

Adhemar posted:

Maybe it was, "should not be called when Jupiter is in the 7th house". What will happen!? :ohdear:

Random cosmic ray causes bit flip on tlb, giving the function psychic powers over all data in physical memory.

chutwig
May 28, 2001

BURLAP SATCHEL OF CRACKERJACKS

fidel sarcastro posted:

I prefer Mercurial, personally. It'll do the same things as Git, but does a better job of hiding the dangerous stuff unless you really need it.

Mercurial's userland is a lot better, but it really runs like poo poo on large repos. I don't know how some of the claimed users tolerate it. I'm moving on this Friday from a job where the main legacy source code repository is in Mercurial, has a 7GB .hg directory and a 5GB working copy over about 210,000 changesets, and holy poo poo it is mercilessly slow. Granted that most people are not likely to be working on repos this large, but between these performance problems, a couple of instances where devs were able to push corrupt changesets to the central repo that required some serious surgery to correct, and a constant tendency to allow the working copy to silently drift out of sync, I have not been left with a positive impression of Mercurial.

Also this same repo is mirrored as a Git repository via hg-git so that devs can break off pieces of the legacy repo into their own Git repos while preserving history, and operations on the Git version are comically faster. Once the engineering teams got used to using Git instead of Mercurial, there's been near-100% unanimity on wanting to get things moved from Mercurial to Git as quickly as possible.

chutwig fucked around with this message at 01:46 on Mar 25, 2015

Deus Rex
Mar 5, 2005

SupSuper posted:

Computer programming doesn't know what a command line is and computer science expects you to already know what a command line so the net result is the same. :shobon:

What?

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

chutwig posted:

Mercurial's userland is a lot better, but it really runs like poo poo on large repos. I don't know how some of the claimed users tolerate it. I'm moving on this Friday from a job where the main legacy source code repository is in Mercurial, has a 7GB .hg directory and a 5GB working copy over about 210,000 changesets, and holy poo poo it is mercilessly slow. Granted that most people are not likely to be working on repos this large, but between these performance problems, a couple of instances where devs were able to push corrupt changesets to the central repo that required some serious surgery to correct, and a constant tendency to allow the working copy to silently drift out of sync, I have not been left with a positive impression of Mercurial.

We're moving the FB megarepos from git to mercurial, and I think we've upstreamed all our changes. You might check out your configuration, and try the file-watching stuff?

dc3k
Feb 18, 2003

what.
I'm working on a mobile app right now. Our engineers have been working with the client and a few of their engineers for the past year or so on this product. We were trying to figure out why scrolling performance on a particularly complicated part of the app had suddenly gone from "pretty good to very good" on most devices to "complete poo poo and dropping assloads of frames even on the most powerful phones"

It turns out our client's developer committed some fixes to a custom text label we had implemented as part of a feature he had implemented. The basic functionality of this custom label is to include clickable links within the text. When the label is configured, some code gets run that detects whether or not a link exists in the plain text, and, if so, magics it into a clickable link that will push to another part of the app or a web view if necessary. It's a fairly expensive operation, and the cost can add up quickly when scrolling fast. So clearly it should be called as little as possible - ie, only when the text changes.

Client dev decided to override almost every label method to call super, then call the code that checks for links. This included setting the font, changing the text colour, changing the background colour, adding an attribute to the text (which actually resulted in it being called twice).

So, when the view was configured with new text, the minimum of the following was happening:

set text
set text background colour
set text font
set text font colour

On top of running the same expensive operation four times in a row for no loving reason, each time it was run it was creating a new instance of the object that we use to check if the links exist rather than just creating it once and keeping it around for the lifetime of the label. This happened for each instance of this label. Of which there were many being recycled and re-configured as the view scrolled. We ripped out all of his lovely overridden methods and stopped recreating the same object over and over and magically the code is 700 billion times faster and nothing broke because changing the font doesn't change the goddamn text so why the gently caress would I need to check for links embedded in the text unless changing the text itself!?!?as;lkgdfhasdjlg

Ugh.

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

Get off the main thread. Then tell me where to send my 5-figure consulting invoice.

dc3k
Feb 18, 2003

what.
Haha, that would be nice. We're too far in to re-factor that much (they're still too busy shoving features down our throats for us to do any maintenance) and they wouldn't let us do it anyways because reasons. Scrolling is pretty close to where I would reasonably expect it to be while doing all UI on main, so I'm not too upset now that this particular fuckup is fixed.

Evil_Greven
Feb 20, 2007

Whadda I got to,
whadda I got to do
to wake ya up?

To shake ya up,
to break the structure up!?
Thanks for these, cool reads. Java is a mess, but it's an extremely well-supported mess.

seiken posted:

Yes. Specifically, I don't agree at all with the argument "OOP is terrible, therefore Lisp is the best language", but I think many of the complaints about OOP are certainly valid in themselves.

Especially the stuff about how if you get to the point where you need all this dependency injection framework crap to initialize your objects, you're doing something very wrong.

It certainly isn't perfect by any means, but I think something like the C++ standard library is an interesting example of something that uses objects when useful, particularly for stuff like RAII, but isn't really OOP in any dogmatic sense (lots of non-member functions, some functional-inspired stuff, and so on).
I have to agree with this.

I think your mention of the C++ std is interesting. Using std adds the string object, which was missing from the original language and a serious deficiency. Still, it leans more towards functional than OO programming, in my opinion. An aside - I don't know about y'all, but even years after it was introduced, I was still being taught (and expected to use) loving char arrays, and it was terrible.

Evil_Greven fucked around with this message at 04:33 on Mar 25, 2015

chutwig
May 28, 2001

BURLAP SATCHEL OF CRACKERJACKS

Subjunctive posted:

We're moving the FB megarepos from git to mercurial, and I think we've upstreamed all our changes. You might check out your configuration, and try the file-watching stuff?

I'd look at it more but I have 3 days left at this job and I can't bring myself to give a millionth of a microfuck now.

brap
Aug 23, 2004

Grimey Drawer
People are right to be suspicious of excessive layers in an app. OOP is guilty of this. But I really don't buy these guys who write about how OOP has ruined everything and if we were all just smart enough to use a lisp life would be great. It's not at all true.

KICK BAMA KICK
Mar 2, 2009

Just a hobbyist, no formal training or experience, asking solely for curiosity: is there a good tutorial or just a simple real-world project that shows how you'd do like a basic CRUD app in a functional style? Cause if you asked me to do that now with no technical constraints, I'd pick an OO-friendly language, find an ORM, implement the models to represent the domain, find a GUI library and glue it all together with one of the MV* patterns. And I can't even begin to conceive of what the functional version of that looks like.

Rocko Bonaparte
Mar 12, 2002

Every day is Friday!

fleshweasel posted:

Basically this. I can respect that git is more useful than centralized version control once you understand all the vocabulary but it's not easy to get started with. The inconsistent naming conventions for commands and arguments really compounds that. If you're doing .NET development I would probably lean toward TFS for most projects. Visual Studio gives you some ability to suspend work on one item and work on another, etc.

The git user experience does completely suck, but I just didn't understand distributed source control as a concept until I was looking at higher-level summaries. I'm pretty sure I would have blown it with an alternative pretty much the same way.

Evil_Greven
Feb 20, 2007

Whadda I got to,
whadda I got to do
to wake ya up?

To shake ya up,
to break the structure up!?

1337JiveTurkey posted:

I've always viewed the language perspective a bit differently. ... I'd say a Board has several Points, each of which has potentially several Checkers.

If some class seems impossible to give a good name (using design patterns in the name is a pretty solid indicator) then it's because it's unclear what the class is. ...

The problem with the language and model perspectives is they don't give any idea of how to make a good design, just how to tell if a design is bad. CRC (Class-Responsibility-Collaborators) cards are a responsibility-based design method that uses the spec to create a design. *snipped description save for one bit below*

... So if the backgammon spec doesn't mention variant rules, there's no need for such a class. If it does, VariantRules works better than MoveValidator because it directly relates to the spec. ...
Going by the author's description, every approach ends up with those objects - the difference is in how they get there. The responsibility perspective first defines WHAT needs to be done, then makes an object WHO is responsible for that. Perhaps limiting it to a single responsibility (though, this could be broad) would be the easiest way to think of it.

Consider another board game: chess. Every single piece is able to capture enemy pieces, and every piece can capture an enemy piece on its normal move... except the pawn. More annoyingly, the pawn moves weirdly - and it has some special rules. You can move it two spaces forward from its starting position - or just one - yet it cannot move backwards. It can be blocked by the enemy. There are also en passant and promotion to consider. Knights are slightly odd, too - while other pieces are blocked by pieces in their path (or stopped by capturing an opposing piece), Knights can jump over other pieces. Where do you validate movement?

CRC cards look neat in their simplicity. I'm not too familiar with them, but from your description and the link, it seems they tackle design the same way the language / model perspectives do: WHO (object), then WHAT (responsibility).

I think that's kind of a problem with how we tend to do OOP - we make a thing, then make that thing do stuff. The problem is, we don't care about these things but rather the stuff that is done. It is odd that we shift the emphasis from verbs to nouns. I mean, consider the bit about taking the trash out - most people can do that if they have to. Physicists or pharmacists, housewives or horse trainers... everyone can take out the garbage unless they have a disability that precludes them from such physical labor. Worse, said disability would make more sense as a state - not worthy of a separate object. Goody - special cases ahoy!

Honestly, this reminds me of (oddly enough) one little thing with Java: toString(). Every object has it, and it's supposed to be representative of the object. It's tempting to use it for something else - I naively used to overload it to essentially take the place of a print method. This seemingly reasonable idea (the object knows its members already!) becomes idiotic very quickly. The object now has the additional responsibility of printing some format, and ifwhen you wantare forced to change that format you will have to change every loving object.

No - instead, I should make a Printing object (gently caress you nouns). Printing gets states from the objects and is responsible for formatting that data for printing. IfWhen I need to change that format, I only have to change that object.

The Laplace Demon
Jul 23, 2009

"Oh dear! Oh dear! Heisenberg is a douche!"
Lisps are languages you should learn for your own benefit. If nothing else, they should help you think differently about problems. Clojure is a modern one that's easy to get started with right now, so I'd recommend giving it a go. 4clojure is a fun collection of problems to get up to speed, and the Joy of Clojure can help teach you the idioms (the book is much better than the blurbs suggest, as is typical with tech).

The two critiques of OOP are hyperbolic and entertaining, but there are much better critiques of enterprise-y OOP than those. Take Peter Norvig's discussion of design patterns in dynamic languages, or Alan Kay's examination of the current state of software engineering. If Hacker News commenter #10038 is turning you off from Lisps, there are actual lucid articles about their value. Check out the histories of Viaweb and Orbitz.

QuarkJets
Sep 8, 2008

HappyHippo posted:

No, he claims that OOP encourages the production of overly complex software. The complexity of the language and the complexity of the software produced in it are not the same thing. If anything I'd the relationship is generally an inverse one. That said I've never used Qi, so I can't comment on it specifically.

It's not as though the same people writing lovely and overly complex OOP code wouldn't be creating overly complex code in some non-OOP language. I'm assuming that he means that it's easier to write lovely code with OOP, but I believe that human nature always finds a way to take simple tools and make a mess of them

QuarkJets fucked around with this message at 07:18 on Mar 25, 2015

QuarkJets
Sep 8, 2008

Karate Bastard posted:

How do you read that from what I wrote? I love me the git. It's just that you* really really very super seldom use anything other than the very basic stuff in your everyday work, and if you get that right, the chances of you loving it up are super low. And if you do gently caress it up it's real easy to fix (for example using the top google hit from stackoverflow as Bognar said) since you're getting the same trivial errors as everyone else and not weird magic errors that it'll take you a day of investigation to fail to sort out. *you: admit it this applies to literal "you" as well.

Well sure, the "unlimited clones" stuff was a comedic exaggeration that I put there because it can be argued that branching comes with lower space requirements while space really isn't an issue for code diffs. I find it handy to be able to "branch hop" at an impulse when I get an idea and just put that down where it should be, without the distractions of stashing or committing with a proper message when all I have is semi finished work.

I'm not saying that you hate git or fear git or whatever else you misread into my post. The guy in the hyperbolic example that I made up ignores useful tools because he has a clunky work-around. That's what you're doing by re-cloning your project over and over instead of just using branches. Creating a bunch of clones for your project and treating each one as its own branch is a workable but clunky solution that doesn't work well when you have a team size greater than 1, which is the real git use case

Do whatever works for you, but let's not go pretending that the only real use case for branching is "lower space requirements"

TheresaJayne
Jul 1, 2011
What i don't get about git is the following.

I want to work on a project,
I have to FORK the project into my own Github Repo.
I then checkout my project to local machine.
I do work
I commit local
I push origin
I create pull request

I now need to merge in Other PRs from other people on the Upstream Repo.

I pull from upstream.
I commit local
I push Origin
(doing this from memory so forgive me if i get it wrong it is a tad convoluted anyway)
WTF!!!!!!

Why can't i just say Merge Upstream into Origin....
Why do i have to commit the upstream into my local to then push to origin.... (or at least pull to local to then push to origin)

(at least thats how github tells you to do it)

TheresaJayne fucked around with this message at 07:51 on Mar 25, 2015

ExcessBLarg!
Sep 1, 2001

TheresaJayne posted:

Why can't i just say Merge Upstream into Origin....
How would GitHub resolve merge conflicts?

nolen
Apr 4, 2004

butts.

TheresaJayne posted:


Why do i have to commit the upstream into my local to then push to origin.... (or at least pull to local to then push to origin)


To prevent or minimize merge conflicts.

Doctor w-rw-rw-
Jun 24, 2008

TheresaJayne posted:

(at least thats how github tells you to do it)
GitHub != git.

If, on GitHub you have commit rights to a project, you can just clone it, push to a branch, and pull request from there. I tried the forking approach initially, but it seems like an unnecessary burden for small teams. Might even be an unnecessary for bigger teams, possibly. Submitting frequent, working incremental changes for review and merging against master is the way to go IMO.

Karate Bastard
Jul 31, 2007

Soiled Meat

QuarkJets posted:

I'm not saying that you hate git or fear git or whatever else you misread into my post. The guy in the hyperbolic example that I made up ignores useful tools because he has a clunky work-around. That's what you're doing by re-cloning your project over and over instead of just using branches. Creating a bunch of clones for your project and treating each one as its own branch is a workable but clunky solution that doesn't work well when you have a team size greater than 1, which is the real git use case

Do whatever works for you, but let's not go pretending that the only real use case for branching is "lower space requirements"

Nah, team is bigger than 1 and the shared repos have branches. Git is dead simple if you don't go fancy with it is what I'm saying, and I don't get why people seem to have such a hard time with it.

Karate Bastard fucked around with this message at 08:38 on Mar 25, 2015

Harik
Sep 9, 2001

From the hard streets of Moscow
First dog to touch the stars


Plaster Town Cop

nolen posted:

To prevent or minimize merge conflicts.
Funny timing, I just ran into that today. Basically, I sent a pull request (Linux support for the SS13 remake), then couldn't find any way to update my repo to theirs online.

I get why (web-based merge tools are a pain, plus they'd have to checkout the files instead of keeping bare repositories) but some way to fast-forward would be convenient.

SupSuper
Apr 8, 2009

At the Heart of the city is an Alien horror, so vile and so powerful that not even death can claim it.

TheresaJayne posted:

Why can't i just say Merge Upstream into Origin....
Why do i have to commit the upstream into my local to then push to origin.... (or at least pull to local to then push to origin)

(at least thats how github tells you to do it)
This is GitHub-specific functionality, so Git is not aware of it.
A FORK is just a way to have a remote that you can commit to (based on the original), even when you don't have commit access to the original project.
A PULL REQUEST is just a wrapper for requesting a merge of a branch (I don't recommend PRing master).

If you have commit access to the original project, then you can just clone and commit directly and can merge PRs directly from the web interface (if there are no conflicts).
Otherwise you have to do this whole malarkey because you're technically running on a separate repository that only GitHub knows it's linked to another project. As far as Git is concerned everything else is just external branches you have to merge and sync yourself.

Sorry, should've clarified.
Computer programming/engineering courses normally just care about programming tools and IDEs so you probably won't even smell a command line, specially since you'll mostly be on Windows.
Computer science courses normally expect that you're already a Linux neckbeard using vim and sed to their heart's content otherwise why would you even be here.
This is purely anecdotal, but the point is you usually have to teach yourself CLIs, so most people won't bother.

SupSuper fucked around with this message at 11:12 on Mar 25, 2015

1337JiveTurkey
Feb 17, 2005

Evil_Greven posted:

Going by the author's description, every approach ends up with those objects - the difference is in how they get there. The responsibility perspective first defines WHAT needs to be done, then makes an object WHO is responsible for that. Perhaps limiting it to a single responsibility (though, this could be broad) would be the easiest way to think of it.

Consider another board game: chess. Every single piece is able to capture enemy pieces, and every piece can capture an enemy piece on its normal move... except the pawn. More annoyingly, the pawn moves weirdly - and it has some special rules. You can move it two spaces forward from its starting position - or just one - yet it cannot move backwards. It can be blocked by the enemy. There are also en passant and promotion to consider. Knights are slightly odd, too - while other pieces are blocked by pieces in their path (or stopped by capturing an opposing piece), Knights can jump over other pieces. Where do you validate movement?

CRC cards look neat in their simplicity. I'm not too familiar with them, but from your description and the link, it seems they tackle design the same way the language / model perspectives do: WHO (object), then WHAT (responsibility).

I think that's kind of a problem with how we tend to do OOP - we make a thing, then make that thing do stuff. The problem is, we don't care about these things but rather the stuff that is done. It is odd that we shift the emphasis from verbs to nouns. I mean, consider the bit about taking the trash out - most people can do that if they have to. Physicists or pharmacists, housewives or horse trainers... everyone can take out the garbage unless they have a disability that precludes them from such physical labor. Worse, said disability would make more sense as a state - not worthy of a separate object. Goody - special cases ahoy!

Honestly, this reminds me of (oddly enough) one little thing with Java: toString(). Every object has it, and it's supposed to be representative of the object. It's tempting to use it for something else - I naively used to overload it to essentially take the place of a print method. This seemingly reasonable idea (the object knows its members already!) becomes idiotic very quickly. The object now has the additional responsibility of printing some format, and ifwhen you wantare forced to change that format you will have to change every loving object.

No - instead, I should make a Printing object (gently caress you nouns). Printing gets states from the objects and is responsible for formatting that data for printing. IfWhen I need to change that format, I only have to change that object.

With CRC cards, I mentioned the classes first since they're the first C, but it's focused on what the responsibilities are. What needs to happen determines what classes do what. When you get into chess pieces or disabilities, the question is "Is this something we need to account for from the spec?" If you want a chess game which allows for variant chess pieces, putting the code to determine the valid moves in the respective pieces makes sense.

For a disabled person taking out the trash, some things will necessarily be different and some things will necessarily be the same with the responsibilities divvied up in a way that reflects that. However without some idea as to what limitations we have to expect on people trying to take out the garbage, we can't tell whether it warrants different people having different takeOutGarbage() methods or if it needs some sort of Job class that has a TakeOutGarbage subclass.

From a modelling perspective whatever has the most expressive power seems superior but if we're looking at requirements, there's a line where it's good enough. Remember that all models are wrong, some are useful.

QuarkJets posted:

It's not as though the same people writing lovely and overly complex OOP code wouldn't be creating overly complex code in some non-OOP language. I'm assuming that he means that it's easier to write lovely code with OOP, but I believe that human nature always finds a way to take simple tools and make a mess of them

There's plenty of overly complicated functional code out there already, it's just easier to mock FactoryFactories than some program which for some bizarre reason needs to model that all Endofunctors are actually Automorphisms. Some days it seems like scalaz is on the fence over whether it wants to go that far up its own rear end.

Qi (now Shen) as mentioned from before uses arbitrary universally quantified predicates as its type system. The example from the language's home page requires explicitly including rules allowing a 2-tuple of a rank and suit to be treated as a card and vice versa. It's great if you want some of your types to have structural subtyping and others to have substructural typing or if knowing whether your program always terminates is more important than knowing if the compiler always terminates. :shepicide:

Newf
Feb 14, 2006
I appreciate hacky sack on a much deeper level than you.

Soricidus posted:

Beware the IDEs of March

Haha.

Wheany
Mar 17, 2006

Spinyahahahahahahahahahahahaha!

Doctor Rope

chutwig posted:

millionth of a microfuck
A picofuck :eng101:

substitute
Aug 30, 2003

you for my mum
Pretty good naming convention imho.

php:
<?
namespace _blah\_global\_core;

abstract class ADefault{
    
    const DB_RESULTS = "db_results";
    const DATA_SET = "ds";
    

    // Constructor
    function __construct(&$data=NULL){
        if(!is_null($data)) $this->__constr_test($data);
    }
    
    // __constr__
    // Used to initialize data member that get intialized the same 
    // for all proxy constructors.
    protected function __constr__(&$data){}
    
    // __constr
    // Proxy constructor with non-database result values.
    protected function __constr(&$data){}

    // __constrDB
    // Proxy constructor with database result values.
    protected function __constrDB(&$data){}
    
    // __constrDB
    // Determines which proxy constructor should 
    // be used intialize object.
    protected function __constr_test(&$data){
        if(isset($data[self::DB_RESULTS])) $this->__constrDB($data);
        else $this->__constr($data);
    }
    
    // Init
    // Proxy function for (re)intializing object.
    public function init($data=array()){
        $this->__constr_test($data);
    }

...
?>

SurgicalOntologist
Jun 17, 2004

Karate Bastard posted:

lots of cloning

It's worth mentioning that when I was learning Mercurial, whatever tutorial I read first said that some Mercurial users prefer maintaining lots of clones and some prefer branches. The author gave the impression that separate clones was in fact the more popular workflow with Mercurial. I never actually tried doing it, seen anyone else do it, or even heard of it again until this thread.

Pollyanna
Mar 5, 2005

Milk's on them.


It's not any one thing in particular, but the codebase I'm working on right now, a Rails-Angular Frankenstein of an app, is huge and messy and so heavily coupled that it makes debugging a nightmare. :gonk: I really want to refactor it and make it less insane, but it's just so massive and I have too much on my hands to actually do so. Plus, I can barely comprehend exactly what's going on at any point in time cause it's so big. I'm reaching the point where I hate working on it because of it's flaws and because of how just a few design decisions would have improved it immensely.

HappyHippo
Nov 19, 2003
Do you have an Air Miles Card?

QuarkJets posted:

It's not as though the same people writing lovely and overly complex OOP code wouldn't be creating overly complex code in some non-OOP language. I'm assuming that he means that it's easier to write lovely code with OOP, but I believe that human nature always finds a way to take simple tools and make a mess of them

I think the point he's driving at is that OOP requires you to write this sort of complex code because of the nature of the abstractions it provides.

Space Kablooey
May 6, 2009


Pollyanna posted:

It's not any one thing in particular, but the codebase I'm working on right now, a Rails-Angular Frankenstein of an app, is huge and messy and so heavily coupled that it makes debugging a nightmare. :gonk: I really want to refactor it and make it less insane, but it's just so massive and I have too much on my hands to actually do so. Plus, I can barely comprehend exactly what's going on at any point in time cause it's so big. I'm reaching the point where I hate working on it because of it's flaws and because of how just a few design decisions would have improved it immensely.
Put your hours in, send CVs and :yotj:

How the hell did they manage to couple AngularJS and Rails, anyway?

HFX
Nov 29, 2004

VikingofRock posted:

In order to use git effectively you only need to superficially understand the data model, and that takes 15-30 minutes of reading the tutorial tops. It's really not a steep learning curve at all.

Also,


how common is this? It's a little surprising to me that people with a CS degree are uncomfortable with the command line.

Way more common than I would like. I'd say the number of people who I've worked with who are at least proficient in an OS other then Windows is about 10%. This includes application devs, web devs, and even embedded devs. There is a popular conception that command line is hard.[quote="Subjunctive"

Subjunctive posted:

Ignoring that not all programmers have CS degrees, the default command line on windows sucks, so if you learned on windows you probably did everything through an IDE.

This probably plays into it a lot. The first thing I install if issued a Windows PC is Cygwin. It just has so many useful features and applications that it is hard to work without it. Need to read a file that is 3GB uncompressed in size, sure no problem. Just pop into less and go.

That said, a good GUI can definitely speed up some operations. GitK or SourceTree is invaluable in helping me to determine what is going on with the source. A good IDE is invaluable.

Subjunctive posted:

Computer science vs computer programming.

A good CS course should at least expose you to several operating systems and how they solve certain problems.

As an anecdote, I have had to deal with several people with CS and CE degrees who think programming is using a GUI editor and editing properties. They can't even code up a basic directory walker in any language. How they make it through the hiring process I will never know.

Munkeymon posted:

Yeah, PowerShell is so heavily locked down that when I wanted to use it to automate a simple check-mod-time-copy-file job I ended up installing and using Python instead because it would take less time and probably be safer than making the task scheduler run a PS script.

I've done this many times with Java, Perl, Python, etc for nearly the same reason.

Pollyanna
Mar 5, 2005

Milk's on them.


HardDisk posted:

Put your hours in, send CVs and :yotj:

How the hell did they manage to couple AngularJS and Rails, anyway?

I just started here, so I can't quite :yotj: yet, but I'm certainly considering it as a way of easing the pain. Certainly won't stay longer than 2 years, regardless of the future.

Rails serves Javascript/Angular assets, with required data passed into it via a top-level object in the window. Changes to Rails directly affect Angular, and vice versa. ERB in Javascript, all that jazz. It's also massive, nightmarishly so, and there's no real concept of modularity for all the features we have - except for half of the code being in lib/ and the other half in app/ for some unclear reason, and there's a ton of duplication and disparity between the two anyway.

I was hired on under the impression that I'd be in charge of refactoring it into something less insane (read: rewrite), but apparently that won't be for a while :( which makes sense, since it's still unclear to me what the architecture (and details of the goal) of the app is. Definitely doing BDD for that project.

...If I get the chance, of course. I'm worried that my constant questions and occasional mistakes might lead them to think I'm not good enough for the job :(

Pavlov
Oct 21, 2012

I've long been fascinated with how the alt-right develops elaborate and obscure dog whistles to try to communicate their meaning without having to say it out loud
Stepan Andreyevich Bandera being the most prominent example of that

HFX posted:

How they make it through the hiring process I will never know.

Do you have an HR department do the hiring where you work? You can apparently get a lot of bad programmers slipping through when a non-programmer is doing the hiring. I've known people who've turned down job offers because of how rudimentary the interview questions were, under the assumption that they'd otherwise be working with a bunch of complete idiots.

ExcessBLarg!
Sep 1, 2001

SurgicalOntologist posted:

It's worth mentioning that when I was learning Mercurial, whatever tutorial I read first said that some Mercurial users prefer maintaining lots of clones and some prefer branches. The author gave the impression that separate clones was in fact the more popular workflow with Mercurial. I never actually tried doing it, seen anyone else do it, or even heard of it again until this thread.
Mercurial didn't support named/in-repo branches for quite some time. When it was added, the semantics of them changed a bit too.

So, in the early days of Mercurial local cloning was the only way of making a branch, with plenty of arguments why it's better than git's model. To be fair, it's not terrible if your file system supports cross-directory hardlinks, in which the space cost of the clone is just the working copy.

Adbot
ADBOT LOVES YOU

HFX
Nov 29, 2004

Pavlov posted:

Do you have an HR department do the hiring where you work? You can apparently get a lot of bad programmers slipping through when a non-programmer is doing the hiring. I've known people who've turned down job offers because of how rudimentary the interview questions were, under the assumption that they'd otherwise be working with a bunch of complete idiots.

At the current job, possibly in regards to the new hirers who can't do things that I would have expected our 2nd year CS students to do in college. However, I've been at previous companies where the CTO and such interviewed them. It is a mystery.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply