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
Khorne
May 1, 2002

dustgun posted:

Back to crummy code.
code:
int Parser::Find()
{
    int found = -1;
    int i;
	for(i = 0 ; i < BUFFER_SIZE ; i++)
	{
		if (STOPWORD == m[i])
		{
                    found = 1;
		    break;
		} 
	}

	if (found != 1)
	{
		 i = -1;
        } 
	return (i);
}// end function
:sigh:
People write code that bad? I hope it was a first year student.

Adbot
ADBOT LOVES YOU

Khorne
May 1, 2002

blueberrypudding posted:

I just had a look and it's actually 200 lines, and he didn't quite write it out. It makes me cringe to see this!

code:
tw = 30;// tilewidth
	i = 30;
	if (_xmouse<i+xoffset) {
		who._x = xoffset+(i-tw);
		thiscol = 1;
	}
	// then we're near column 1  
	if (_ymouse<i+yoffset) {
		who._y = yoffset+(i-tw);
		thisrow = 1;
	}
God I hope he's not a goon.
Wouldn't those ifs always evaluate to true because it's a check if something<i and then adding a number? I guess it depends on the language. I still have no idea how he didn't think of the obvious solution. Something like this, although I'm not sure how accurate it is because I didn't look past the first if set because I got tired of following the variable names and redundant stuff. For the record, I've never been paid or studied programming.

code:
tw=30;

x_col=_xmouse/tw;  //Depending on language/variable type you'd have to floor it
y_row=_ymouse/tw;

who._x=xoffset+x_col*tw;
who._y=yoffset+y_row*tw;

thiscol=x_col+1;
thisrow=y_row+1;

Khorne
May 1, 2002
edit: nevermind, completely missed that it was while(FALSE) and not while(TRUE), because if it were while(TRUE) it would have been appropriate to use break over goto

Khorne fucked around with this message at 20:03 on Feb 27, 2010

Khorne
May 1, 2002

An Outland Dish posted:

For one of my online homework questions in my intro to programming course for c++, one of the questions was:

" Assume that day is an int variable whose value is 1 or 2 or ... or 7. Write an expression whose value is "sun" or "mon" or ... or "sat" based on the value of day. (So, if the value of day were 4 then the value of the expression would be "wed".)."

The only acceptable solutions?


Now none of my classmates use the ternary operator anymore. What a terrible example.
Clearly the superior solution is to set an array named day_lut as a global

char* day_lut[8];
day_lut[1]='sun';
day_lut[2]='mon';
...
day_lut[7]='sat';

and then day_lut[day]; with no checking to see if day is a valid number


Why yes, there was tons of code like this at the place I was contracted to code for.

On a better note, while that is a terrible example for the ternary operator just take comfort in the fact it could have been worse. Just look at the example you responded to.

Khorne fucked around with this message at 05:21 on May 13, 2010

Khorne
May 1, 2002

Avenging Dentist posted:

Your example is a clamp/assertion away from being the "right way" in C. Perhaps it is you who is the horror, goon sir? :smug:
The real horror is my failure to express myself clearly. The last line in my post wasn't meant to reference my actual post because I didn't user the ternary operator at all. :(

I personally use "that way" when I do things in C. I've even done it in scripting languages because the difference is often non-existent. The horror is when there are multiple arrays defined for the same purpose, using commonly used variable names/names that make no sense, no checking if the value is within bounds (especially when invalid values can and will be passed from time to time), and using it for everything including avoiding a simple if->else construct for two numerical values that aren't referenced anywhere else.

The look up table array thing is great when you have numbers assigned to strings and it gets referenced often or used in multiple functions/places, but it's really not great when you are just using it as a lazy one-off else-if and don't implement it properly. You know all of this, but I have to defend my C coding honor.

Khorne fucked around with this message at 05:27 on May 13, 2010

Khorne
May 1, 2002

New Yorp New Yorp posted:

Have you ever explained to a room full of developers that their workflow was changing from "check out file, make changes, check in file, resolve conflicts if necessary" to

"create a new branch
check out the branch
edit files
stage your changes
commit your changes locally
fetch the latest changes from the remote
merge your changes
resolve conflicts if necessary
push your changes to the remote"

?

I have. Many times. I've never encountered a group that didn't ask the question, "Why are we going through all of these extra steps?" and the answer that I've always kept to myself is "Because upper management is cargo culting and making unnecessary tooling changes."
The real reason is because CVS/SVN is a nightmare. People who don't think git rules or understand why just haven't had to actually deal with CVS/SVN in any real world environment with 20+ contributors or even 3-4 disjointed contributors who may need to work on a single file or a few of the same files at the same time. It becomes a 20+ hour/wk job for somebody to make things work when those contributors/developers aren't going to resolve conflicts themselves. Which was extremely common in open source projects.

The complexity of CVS/SVN exceeds git's when you start getting into really common development tasks, and instead of it being handled by the software the complexity has to be handled by maintainers, developers, and/or the organization. It's truly awful and I'm glad it's dead for common use. Git handles that stuff in a clean way with no external tools.

Even as a single dev, git is extremely good and convenient due to its local nature. Kinda like using linux is really good and convenient if you're a developer. It does require some investment to learn git. A few hours and five minutes of googling here and there, like the rebase thing above, but the pay off is huge. There's a reason it's the standard now and it isn't momentum or a fad.

edit: To be fair to SVN, the last time I used it was in 2009. It looks like they've updated a whole lot of things since then. Git is not without its flaws either. Even sites really biased toward svn, like https://svnvsgit.com/, don't really sell you on SVN. Most of the git flaws are "you can't do things you shouldn't be doing anyway" and "your developers might have to learn how to use it because it can do powerful things", although a few are pretty legitimate complaints for specific uses. If SVN is used in certain business environments, it's understandable and they likely have the structure and policy to properly run with it. I don't like distributed things much in general, but Git solves so many problems you encounter while using non-distributed systems that it has won me over.

Khorne fucked around with this message at 00:45 on Aug 15, 2017

Khorne
May 1, 2002

New Yorp New Yorp posted:

- are currently using centralized version control
- have no problems with centralized version control workflows
- rarely think of version control in their day-to-day work

This is a real good reason to not switch to git. Their current system is in place, solid, and working.

I'm not sure if medical, finance, or accounting make much of a difference for SVN vs git. Some argue that git doesn't let you hide stuff from some users, but I'd argue version control is probably not where those things belong in the first place.

Khorne fucked around with this message at 14:01 on Aug 15, 2017

Khorne
May 1, 2002

GenJoe posted:

You are a 2-3 person development shop, and you need to build out a relatively complex web application. Node.js is appealing because:

• It is extremely simple to deploy. Your web application is the web server, and you don't have to proxy it behind Apache or nginx. This can and will save you a ton of time unless your deployment needs are exceedingly complex for whatever reason, in which case it's probably similar in effort to setting up a traditional web server.

• The community frameworks that actually matter are all maintained by smart people, so you can drop something like Express in and have middleware/cookies/sessions handled for you without having to worry too much about anything.

• Javascript as a language is actually relatively good now. ES7 is adding async/await (and the Promise support that's already there is very good), JSON literals and native parsing take away some of the cumbersomeness that you get with other languages' JSON libraries, and the dynamic type system makes new code quick to write. The lack of good OO is actually a blessing imo because it discourages bad and unnecessary object hierarchies that probably shouldn't have any place in a web application. Same with the lack of threads. Your application code does not need threads. Node.js under the hood is heavily multi-threaded, but that's so it can handle I/O and task scheduling -- your application code is fine without threads and you will complicate the poo poo out of your program if you try to introduce them.
This describes every worthwhile web language under the drat sun and even some questionable web languages. Golang and Python in particular are wildly popular and can both do this. Even dang PERL, a dead web language, has Mojolicious which will do all of this trivially.

I love Javascript for what it's good at. I've used Node a decent amount. Just, most of the time you should probably consider other options unless it's a small project or really time constrained. Javascript feels like you're perpetually prototyping.

Khorne fucked around with this message at 16:04 on Sep 2, 2017

Khorne
May 1, 2002

PhantomOfTheCopier posted:

Seemed to be getting off topic; as I said, time to move forward. I think "how do I work in change/revision control system /dev/null?" belongs in the other thread, but it's probably effectively a "how do I git?" thread so good luck with your non git questions.


Here's a "C: advanced" programmer that didn't get hired after the interview:
code:
llswap(node* ll, i, j) {
        node* a=llidx(ll,i-1);
        node* b=llidx(ll,i);
        node* c=llidx(ll,i+1);
        node* d=llidx(ll,j);
        a=>next=d;
        c=>next=b;
        b=>next=d=>next;
        d=>next=c;
}
What is happening here. What is supposed to be happening here? Swapping i and j in a linked list? Is llidx predefined? Is llidx supposed to be a node number in the list or an idx variable in the item that's not guaranteed to be in order? Why is => there instead of ->. Why do i and j not have types but node* does?

Are there parent and child references? I guess without parent references you need to loop through the linked list until you get to something whose child is i or j. With parents this is unbelievably straight forward unless you're trying to be like "i/j is the head node! gotcha!"

edit: Oh. Uhh, wouldn't c->next=b be just wrong? There's no guarantee i+1 is supposed to point to j. It should be j-1 instead of i+1, but the variable names and structure of this function are questionable. There's no checks if you're getting a valid node, no checks for bounds (if i=head or i=tail, have fun), etc. Man what the heck. I'd definitely at least use like ni, nj, nip, njp or something and allocate them in a way that makes sense logically. It's important to be anal when writing C functions that are presumably going to be relied upon by unknown, higher level code. It's also important for code to be somewhat readable in case you screw up or someone wonders what it does.

Khorne fucked around with this message at 20:23 on Sep 2, 2017

Khorne
May 1, 2002
Did you guys know you can solve the dining philosophers problem by just delaying the start of the dining?

Philosopher one dines with no start delay, his adjacent philosophers dine with some small initial delay, and the last two guys dine with a larger initial delay than the previous two.

:suicide:

Khorne
May 1, 2002
And here I am thinking that C++11 and beyond bloated the language a bit.

Khorne
May 1, 2002

Athas posted:

Well, the researcher problem is to document a parameter called "u" with the description "u". The weird parameter indexing is just... I don't know.
The other problem is half of them are constants that likely don't change. It's almost like a struct could be useful there so you don't have 13.75 parameters that largely don't describe what's happening, what state is modified, etc. Instead you'd have the business side of the variables being passed in 6 parameters and a struct containing "constant" environmental stuff that's likely passed to other functions, or 'kernels' as the gpu nomenclature goes, as well.

Maybe I am the horror here, I don't know.

edit: for example, one instance of my program will have 12 variables that don't change during the life of the program but you might stop your program, change the settings, and restart your program. I usually establish a struct for "settings" and then either pass it to relevant functions or keep it as a global. Stuff like time step size when it's constant, bounding box, particle count if it never changes, that kinda stuff.

Khorne fucked around with this message at 16:29 on Jul 21, 2018

Khorne
May 1, 2002

Ola posted:

Pass by value = Debbie doesn't swallow
Pass by reference = Debbie swallows
you got it backward...

Khorne
May 1, 2002

Ola posted:

Have I? If she spits returns my parameter back at me, clearly it's been modified in some way. Or hmm, perhaps pass by value can be seen as the used parameter is now gone and we will never see it again, ok I can go with that.
I just wanted to make a joke.

Khorne fucked around with this message at 20:04 on Jul 24, 2018

Khorne
May 1, 2002

ratbert90 posted:

Low level C programmers that treat C++ like C with classes are the absolute worst.

Managing their own memory? Check
Char pointers and char arrays? Check
Trying to write their own god damned libraries for everything? Check.

It's a modern C++ Linux project, please for the love of god treat it as such!
This is a legitimate use of C++, but it doesn't sound appropriate for your project or the portion of it he submitted. I don't get why people complain about it all the time like you should never do it. There are many subsets of C++ that are valid for different uses. Well, except for "writing your own libraries for everything". That's somewhat useful as a learning activity for certain data structures or algorithms, but it's usually better to grab something that exists unless your project has very specific needs.

If you really want to troll open source C++ projects submit "C but functional programming". Did you know you can implement tail call optimization in a handful of lines?

Khorne fucked around with this message at 23:50 on Jul 25, 2018

Khorne
May 1, 2002

rjmccall posted:

There are all sorts of things you can cut out of your C++ Experience™ and still be a reasonable C++ programmer — exceptions, RTTI, complex inheritance, heavy template use, virtual dispatch, heap allocation, and so on — but I have zero reservations about saying that if you're not using classes with constructors and destructors to encapsulate data, preserve invariants, and manage resources, you are just a bad programmer and you should learn to be better.
I just assumed they were manually doing memory stuff in the constructor, destructor, and other relevant parts of the class. My interpretation of "C with classes" is more C++ without the stl and with some bias toward doing things in a verbose C way when C++ has more concise language features.

I get what what people are complaining about now if people actually do what you outlined. I also get complaining about what I described above if it's in software where you absolutely should be using the stl and writing code in a way that the rest of the project is written.

Khorne fucked around with this message at 16:57 on Jul 26, 2018

Khorne
May 1, 2002

ratbert90 posted:

Woah woah woah there pal. Let's not get hasty! Postgre supports JSON and JSONB and is cool and good. I haven't actually ever ran into any problems with yanking a json object out of a pgsql db and having anything bad happen to it. I assume it's probably not efficient or something when it comes to high capacity websites, but I am thinking embedded here. :shrug:
As a rule of thumb, it's fine as long as you're not trying to manipulate it in SQL. Meaning, to SQL it's just arbitrary junk that it's going to spew out in a select. There's certainly some caveats depending on the nature of the data.

Ranzear's solution is a very SQL solution and makes sense sometimes for data you want to do SQL stuff to. It has its own caveats if you are talking ultra high capacity. I mean, sometimes you have a table with a lot of columns. There's nothing inherently wrong with that, although naming it "Field1 ... Fieldn" seems like total nonsense and like a blob really might be the best solution or rethinking what you're doing entirely that necessitates storing it that way. Sometimes you split that table up into a few tables, sometimes you split it up like ranzear suggested, and sometimes you serialize it and store it as a blob because you don't need to do SQL stuff to it.

canis minor posted:

This, but serialized data.
Good news, JSON is a kind of serialized data. Maybe not the best kind for many things, but I thank god everyday that it's not XML.

Khorne fucked around with this message at 23:13 on Jul 27, 2018

Khorne
May 1, 2002

Jeb Bush 2012 posted:

I know names are harder than anyone expects but I am still amazed that anyone would be stupid enough to think that "10 letters, no special characters" would be a reasonable restriction on a field that is required to contain someone's (exact, legally specified) name
One time at an airport, I overheard someone with no last name try to get onto a flight. His passport had a blank space in the last name field. He had put "LNU" on the online form because it required characters for a last name and wouldn't accept a space. FNU is standard convention for no first name, but it's usually on the passport. Lots of times people will write "NA" or "not applicable" when forced, but boy that airline employee was not having any of it because his last name clearly wasn't Lnu on his passport. Which was what the website automatically converted LNU to.

edit: Yeah, you usually see First: FNU, Last: their name. I have no idea why this guy's passport was like that, but he ended up getting on the plane anyway.

Khorne fucked around with this message at 02:04 on Aug 13, 2018

Khorne
May 1, 2002

ratbert90 posted:

I’m tempted to get a thread ripper 2. 32C/64T@4.2GHz. :stare:

Unironic “make -j64”. :shepspends:

If it wasn’t for the fact that it’s brand new, and AMD cpus tend to have garbage support for KVMs, I would be all over that.
Everything is fixed now in open source land. The only thing you'll have difficulty with is GPU passthrough for things like gaming, but that's true for Intel/AMD/Nvidia or any mix of them. It's just where that tech is at.

In a bizarre twist of fate, or perhaps a sign of the times, it's Windows that has poor support for the threadripper at the moment.

Khorne
May 1, 2002

TooMuchAbstraction posted:

Wow, I typoed the poo poo out of that example query.

But yeah, MySQL. I didn't set up the database. :shrug:
That's a literal SQL anti-pattern. I don't get why there are so many SQL horrors. Do people just not take the time to learn SQL, a functional programming language they are using whether they realize it's a programming language or not, and mash their heads into a wall until something returns the dataset they want?

I guess I know the answer considering the NoSQL "revolution" and all of the horrors there I've witnessed.

Khorne fucked around with this message at 04:10 on Aug 26, 2018

Khorne
May 1, 2002

TooMuchAbstraction posted:

Nope! It just gets silently truncated! :shepface:
It emits warnings with code by default and has for a while. It won't interrupt the query in any way. I think in the latest 8.0.x version it makes it an error in strict mode, but I am not really sure and it definitely was just a warning for a long time and maybe still is.

I'm still working with some early 5.x MySQL servers. I don't know why because we definitely have and use up to date versions of MySQL and other databases. At least I'm not the guy managing Java and Oracle stuff from nearly two decades ago.

Oh, the box running Java5 and an OS that hasn't seen an update in over ten years got compromised?

Khorne fucked around with this message at 21:59 on Aug 26, 2018

Khorne
May 1, 2002

Absurd Alhazred posted:

On a scale of 1 to 11, how bullshit is this?
It's really secure right up until the user hits "yes".

Webcam, microphone, and storage media are already securely accessible from web pages. It's not quite as insane as it sounds, and they propose similar security mechanisms.

Khorne
May 1, 2002
With FIFO and LIFO taken, I'm an octree with two spatial dimensions and one temporal.

Khorne
May 1, 2002

CPColin posted:

Holy poo poo that whole repo is a loving dramabomb right now.
It's cracking me up from every angle. From the bizarre "This is dishonest and not the MIT license!" responses to the actual implication of the license change that anyone not on that list could obtain the software and then redistribute it to someone on that list lawfully to back pedaling within a day of the change. Heck, the origin of it being an appeal to emotion to change the license for a javascript package management tool that isn't actually being used for evil is funny too. You'd think it was some kind of advanced image recognition software being used to detect immigrants at every stoplight or something.

Execution and circumstances aside, attacking organizations through the licensing of software is actually a cool concept.

Khorne fucked around with this message at 20:25 on Aug 31, 2018

Khorne
May 1, 2002

Suspicious Dish posted:

Old browsers were really bad and would parse <script>"<script>"</script> as a nested script tag because that's sort of weird. The text/javascript replacement either to get around some extremely sort of basic filter / block or a misunderstanding of what was going on with the "scr" + "ipt" thing. Note, that this hack hasn't been necessary since IE5.
I saw this advocated in an 2018 article.

Khorne fucked around with this message at 03:08 on Sep 7, 2018

Khorne
May 1, 2002

Volguus posted:

Hey, stop making fun of Gnome, they'll remove the browser completely next version.

P.S. Just saw latest version in fedora 29, they removed the maximize button by default. Maybe can be re-added via Tweaks or some extension, but ... WTF, really? I became a KDE user since gnome 3 blessed us with its presence.
Does anyone actually click the buttons to do window functions?

This is not a sincere question, but it's likely how the button was removed.

Khorne
May 1, 2002

Loezi posted:

More of a computers-are-a-horror but I was recently made aware of the fact that given an initial state of
The horror here is in the code and not the hardware.

Or perhaps in your expectation of the output of that code, because code like that is fine if you are expecting input from either state and there's a guarantee that the MOV is atomic.

edit: There's also the obvious that I overlooked, that registers are thread-local. They'll always be "0" or "whatever they are set to not from your threads" if you create two threads to execute your instructions and then check EAX and EBX from the thread that launched those other threads. I was too caught up on the assembly and parallel execution. If you're reading from the threads given, one of the registers should always be zero because you're not setting it in that thread. The register you are setting will either be 0 or 1.

Khorne fucked around with this message at 23:06 on Sep 28, 2018

Khorne
May 1, 2002

quote:

I think that's called "software development." For example, every REST or GraphQL web app right now would have been faster and more secure as a database that properly uses authentication, authorization, triggers, relations and constraints. But once a problem is solved, you need to start coming up with more problems. So let's just use the database as a key-value store and rewrite all the rest in slow-as-hell, insecure-as-poo poo Rails.
Databases are very good and their features are underused and changing databases to k:v stores is bad but not what most people are doing. Placing k:v stores and REST apis in front of them is done for many sane business reasons. From a purely technical standpoint, there may be cases where the db way is justifiable. For most "public api" use cases, probably not.

And yeah, GraphQL is/was in pure hype mode. It's a reasonable thing to use in some specific cases, but it's getting wildly overused.

Khorne fucked around with this message at 17:39 on Oct 1, 2018

Khorne
May 1, 2002

Zopotantor posted:

The author clearly doesn’t know what "volatile" is for, so they probably misunderstood the problem, too.
Please respect the project style guide where volatile means mutable.

Do you want to find out what inline means?

Khorne fucked around with this message at 15:47 on Oct 3, 2018

Khorne
May 1, 2002

namlosh posted:

...Until you can’t because the rules are too complex to be serviced by the c# Task.Parallel or other libraries.

Then you try to find someone who has multithreaded programming on their resume AND knows what a semaphore and mutex is and fail because the concurrency library is all they know and they’ve never had to deal with dependencies between the data being processed (shared state).
Intel's TBB can extend the ground covered by libraries pretty well. I definitely agree with you though, once the task goes beyond concurrency/async/embarrassingly parallel you're on your own even if you use a library to avoid boilerplate.

Khorne
May 1, 2002

Jaded Burnout posted:

I found the culprit for the copy/paste block of garbage single-letter variables. Of course *some* people think it's good code..
https://stackoverflow.com/questions/149055/how-can-i-format-numbers-as-dollars-currency-string-in-javascript/149099#149099
If you find yourself assigning a variable to itself within the function-wide definition of that variable for a variable that's already defined in the function's scope you're probably beyond hope. This seems like one of those vertical alignment motivated coding horrors except there's so much more to it.

Also, you all missed the real obvious significance of these single letter variable names:

c = "count of significant figures after the decimal point"
d = decimal point
t = triple digit separator
s = sign
i = I gave up trying to think of how to describe this
j = justify using a triple digit separator

Khorne fucked around with this message at 15:50 on Oct 12, 2018

Khorne
May 1, 2002

hailthefish posted:

That would be pretty weird and horrible if that's actually what's happening.
Yeah. Your MMO netcode for determining hits shouldn't be client-side.

Unless it's a situation where the other players could see him on the server but the los check was failing server side too for some reason. That's more understandable I guess, but I find it less likely given that he stood still and zoomed and died. Zooming shouldn't actually change anything on the server.

Khorne fucked around with this message at 15:17 on Oct 26, 2018

Khorne
May 1, 2002
I find it far fetched that both a php lambda exists and that someone also decided to use it.

Khorne
May 1, 2002

xtal posted:

Lambda is basically overcomplicated, expensive CGI, so that makes perfect sense. I also don't know why someone decided to use it.
I find it far fetched that I forgot php is CGI.

Jokes aside, there are some legitimate uses. I'm not even sure how most places use Lambda. Where I've worked, it's largely used to perform cron style tasks or to trigger on certain conditions that often wouldn't be desirable or possible on a node itself. There's also a convenience factor at times. With all that said, I'm not sure why you'd write anything like that in PHP. And I don't even hate PHP or anything. I'd take a job writing PHP if the compensation and fit were right, but I've yet to see one of those.

Khorne fucked around with this message at 15:47 on Nov 30, 2018

Khorne
May 1, 2002

New Yorp New Yorp posted:

Not everyone has used *NIX systems extensively. Or at all.

Like, I've spent my entire career working in Windows. That's not to say that I've never used Linux, but if we made a pie chart of "hours spent using OS", I don't even think the *NIX slice would be visible. I know what grep is but don't think I've ever used the command.
I've spent 99% of my work time on windows too. MSYS2, cygwin, and linux subsystem for windows are all decent depending on use case. And hopefully sshing into linux servers counts as on windows still given lots of my workflows were mixed like that.

With modern editors/IDEs, is there even a difference anymore given how awesome VSCode is, the command-line stuff is mostly useful for project janitoring, setting up environments to run in, and when combined with git. And even with git, it's not nearly as useful and prolific as it was with CVS/SVN.

I'd find it either suspicious or irrelevant if they didn't know what grep is depending on the language used and the projects they've had experience with. At the same time, they're a junior dev so it doesn't matter. grep, like all GNU, takes half a second to learn and a lifetime of man, --help, or googling to never master. And by that I mean, it's easy to know what a command can be used for but most are used infrequently enough that you never really commit it to memory and just look it up.

Khorne fucked around with this message at 16:33 on Jan 5, 2019

Khorne
May 1, 2002
I don't get why people use anything other than command line for git. Everything else is awkward in comparison. Especially once you understand what git is doing under the hood and want to make sure the right things are happening.

I work with plenty of people who use GUIs for git stuff. I'm not knocking it too much, but you're putting in way more effort to learn a cumbersome gui than it would take to just learn git.

Khorne fucked around with this message at 14:31 on Sep 30, 2019

Khorne
May 1, 2002
Just wanna say thanks for the replies everybody. I asked you something I didn't want to ask my coworkers because people get all high and mighty about their preferred way of doing things, feel like you're calling them out and start questioning their life choices, or think but don't say "who cares can we talk about something else".

Some good, insightful reasons as to why some people prefer GUI. A few of you just need to spam "git status" between every breath and use git diff with either HEAD~N or a remote branch name to solve your CLI woes. But some others had good points, like if you're regularly but not frequently doing complex staging workflows the CLI is going to be a pain. And some people will prefer visualization. Which makes sense, because you made me realize I sometimes check bitbucket or github or whatever for similar things. So truly, I am inferior for using a web interface instead of a GUI.

I never even considered the "I use both" workflow, either. Most GUI users I know use the GUI until they're forced not to because they accidentally broke everything with the GUI.

JawnV6 posted:

this is some faint praise
Git's one of the top 5 advances in software engineering in the past 20 years. It's just significantly more complex than what came before it and takes actual effort to learn.

If you meant that the other way, like for me, I didn't mean it that way. I consider lots of people who replied better at programming and probably git.

Khorne fucked around with this message at 05:19 on Oct 1, 2019

Khorne
May 1, 2002

Bongo Bill posted:

Scrum is the compromise you resort to when you don't have the autonomy to do something sane instead.
These systems require competent management, communication between teams, and a non-poo poo work environment. It's not something that solves big problems in the workplace unless your big problem is "we do a lot of work but our releases are 1-3 months late because we can't predict anything". It solves that really well in my experience.

The big pluses of implementing them are consistent and predictable workload for developers (aka work sane hours/schedule how you spend your time better), product getting "this is a way to get developers to evaluate the rough time it will take to do the stories related to this feature so we can figure out how many features make it into a sprint, cut requirements, split it into two releases, or know which release it could feasibly be in", and management of developers getting "this is a way for us to predict the rough output of our team in a given sprint and for me to assign appropriate workloads to individuals, see how a junior developer matures over time, etc."

The point of these systems is to create an iterative process that fosters communication between teams, gives a rough roadmap to everyone relevant in the company, and allows you to modify that roadmap if things don't go as planned. The point isn't "each developer's peak output is 13 points per week and we'll now require that".

yes I've had largely positive experiences with agile/scrum/kanban, but it's not because the systems are amazing it's more that people employed techniques from them that solved actual business problems we were having in a way that was appropriate for the company.

Khorne
May 1, 2002

rjmccall posted:

Why didn’t you just reorder the new columns to be last instead of making them jump through the extra hoop of figuring out that the new data is missing? Just to spite whoever does their data import?

CSV import assuming that columns are in a specific order instead of actually comparing column labels is probably the norm. Not defending it, but I’m not sure I’ve ever seen an import script that was actually that clever.
It's about as standard to use column names to import csvs as it is to use an index. Most CSV libraries support it through either a map or struct equivalent. It's not really any different from obtaining indices by comparing column names in the header which is ancient csv parsing tech.

How standard it is probably depends on the language. Python is extremely common in ops/data science/analyst land and DictReader/DictWriter or pandas sees pretty prolific use there.

It's also standard to never reorder columns because you want the least friction possible for any manual excel automation, "magic" bi software, index-based approaches, or "I've seen this CSV 1000 times why is this column different now it ruins everything and I will brood everytime I see the change" people.

Khorne fucked around with this message at 02:43 on Jan 24, 2021

Adbot
ADBOT LOVES YOU

Khorne
May 1, 2002
Exercise left to the reader: write an equivalent for Windows.

* imports C dll that writes to random memory addresses through FFI with safe wrapper and curses the lack of safety in Rust *

* calls NtWriteVirtualMemory/WriteProcessMemory from safe rust and curses the compiler for not saving me from myself *

Khorne fucked around with this message at 15:27 on Feb 28, 2021

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