|
ultrafilter posted:You might not be able to break anything permanently in a git repo, but you can definitely lose local changes that you haven't pushed to a remote. It's very easy to lose uncommitted changes, but very difficult to actually lose committed but unpushed changes.
|
# ? Nov 30, 2020 22:00 |
|
|
# ? May 23, 2024 12:20 |
|
pokeyman posted:Now imagine someone who doesn't find it extremely simple and intuitive. It's difficult for me to reconcile this with "being a professional software developer". This isn't a sentiment that I usually express, because I generally just repress it instead of trying to crystallize it into something that doesn't come out as a direct personal attack. Git, in general, is complex enough to warrant pretty much perpetual confusion and resentment, I don't necessarily agree with this but I think its wholly justifiable. Github flow, though, is a shared log of changes to a file tree and the difference between that log and your own copy of it, the extent of your commitment as a developer is the changes that you make to your copy of the log and the process by which those changes are integrated into the shared log. A key distinction here between github flow and the OP's git flow is that there is no develop branch, there is only main, and main is always (theoretically) production. This drastically simplifies the branching model to the point where it is reasonable to expect that a feature contributor fully understands it, you can put it in the job description. If you start mixing in shared branches, release branches, etc, it's because you've identified a need for some local expertise. Why can't main also be production? The people who know the answer to that question are now the release team, and managing it is part of their job. ultrafilter posted:You might not be able to break anything permanently in a git repo, but you can definitely lose local changes that you haven't pushed to a remote. Certainly, but so long as you have committed (or stashed, please use git stash) your changes, you will always have them unless you start rewriting the past. I think git is pretty good about warning you that you are doing this, but again, you have to be operating in a mode where you are intentionally building a mental model of how this tool works. Pasting something from stack overflow and smashing yes until your bash prompt comes back will eventually cause you harm.
|
# ? Nov 30, 2020 22:05 |
|
12 rats tied together posted:Certainly, but so long as you have committed (or stashed, please use git stash) For those who are unaware, git stash -i is a thing and it is magnificent.
|
# ? Nov 30, 2020 22:54 |
|
Thanks for the answers. That magic program is interesting.
|
# ? Nov 30, 2020 23:45 |
|
Volmarias posted:For those who are unaware, git stash -i is a thing and it is magnificent. i can't find -i in the docs for stash
|
# ? Dec 1, 2020 00:07 |
|
12 rats tied together posted:It's difficult for me to reconcile this with "being a professional software developer". This isn't a sentiment that I usually express, because I generally just repress it instead of trying to crystallize it into something that doesn't come out as a direct personal attack. Git, in general, is complex enough to warrant pretty much perpetual confusion and resentment, I don't necessarily agree with this but I think its wholly justifiable. I'm not sure what to tell you except that there exist capable professional software developers working within established git workflows who nonetheless manage to end up getting stuck and cloning afresh. Maybe they're stupid, or maybe they're struggling with an obtuse tool.
|
# ? Dec 1, 2020 00:59 |
|
redleader posted:i can't find -i in the docs for stash I meant -p, good thing git is consistent in its arguments and usage!
|
# ? Dec 1, 2020 01:23 |
|
Volmarias posted:
quote:A novice was learning at the feet of Master Git. At the end of the lesson he looked through his notes and said, "Master, I have a few questions. May I ask them?" Source
|
# ? Dec 1, 2020 01:33 |
|
12 rats tied together posted:Certainly, but so long as you have committed (or stashed, please use git stash) your changes, you will always have them unless you start rewriting the past. I think git is pretty good about warning you that you are doing this, but again, you have to be operating in a mode where you are intentionally building a mental model of how this tool works. Pasting something from stack overflow and smashing yes until your bash prompt comes back will eventually cause you harm. Even once you've started rewriting history, unless you explicitly call git gc (protip: there is almost never a reason to do that) your stuff is still all there in the reflog, although it may be hard to find.
|
# ? Dec 1, 2020 02:14 |
|
pokeyman posted:I'm not sure what to tell you except that there exist capable professional software developers working within established git workflows who nonetheless manage to end up getting stuck and cloning afresh. Maybe they're stupid, or maybe they're struggling with an obtuse tool. It's definitely obtuse, but there seems to be a sense of git being somehow intractably incomprehensible rather than just a powerful tool built out of a fairly straightforward ontology hidden behind a terrible UI.
|
# ? Dec 1, 2020 02:30 |
|
Volmarias posted:
neato, thanks!
|
# ? Dec 1, 2020 02:49 |
|
raminasi posted:It's definitely obtuse, but there seems to be a sense of git being somehow intractably incomprehensible rather than just a powerful tool built out of a fairly straightforward ontology hidden behind a terrible UI. Sure, obviously it's not impossible to use. But I don't at all look down on anyone who finds it unintuitive. And it's unfortunate because we have many equally powerful tools with better interfaces. Assuming that a developer who has trouble using git is an unprofessional idiot is a dumb, revealing take.
|
# ? Dec 1, 2020 02:57 |
|
Cheers for the advice KillHour (and for the git discussion it triggered, always gets a bit heated but good advice there anyway). As an aside has anyone used gitless? I was going to have a play around with it as the interface seemed...sensible I guess, and I can use it locally without it affecting workflows, just wondering if there was much point.
|
# ? Dec 1, 2020 10:50 |
|
KillHour posted:Excel is already Turing complete and so is PowerPoint, for that matter. Sure, I mean it's getting better about visualizing what it's doing.
|
# ? Dec 1, 2020 23:15 |
|
Anyone who has trouble with git internals should read chapter 10 of the Pro Git book: https://git-scm.com/book/en/v2/Git-Internals-Plumbing-and-Porcelain It’s enlightening.
|
# ? Dec 2, 2020 01:10 |
|
Really basic question here, but as I'm teaching myself Python from scratch I don't have a teacher to bug with it: When should I be using for instead of a while loop? Seems like they both accomplish the same things with the only difference being that for establishes a variable and has a finite amount of possible loops. The book I'm using alluded to for being better coding convention, but didn't say why.
|
# ? Dec 2, 2020 14:04 |
|
Fruits of the sea posted:Really basic question here, but as I'm teaching myself Python from scratch I don't have a teacher to bug with it: A for loop is generally going to be more convenient for iterating over a list
|
# ? Dec 2, 2020 14:29 |
|
The general rule of thumb is to use a for loop when you know how many iterations the loop will take, and a while loop otherwise. Iterating over all the elements of a collection is always in the former case (although you probably want to use comprehensions if you can for performance reasons).
|
# ? Dec 2, 2020 14:40 |
|
ultrafilter posted:The general rule of thumb is to use a for loop when you know how many iterations the loop will take, and a while loop otherwise. Iterating over all the elements of a collection is always in the former case (although you probably want to use comprehensions if you can for performance reasons). Unless you modify the collection within the loop! Don't do this Okay, you might want to do this if it's a queue or something, but you won't need to do this until you're a lot more experienced. For now, don't do this.
|
# ? Dec 2, 2020 15:45 |
|
KillHour posted:Unless you modify the collection within the loop! Agree for a list but is extremely common and necessary to loop over a pandas dataframe, modifying the elements in the rows.
|
# ? Dec 4, 2020 05:31 |
|
CarForumPoster posted:Agree for a list but is extremely common and necessary to loop over a pandas dataframe, modifying the elements in the rows. Modifying the elements in a loop is extremely common. Modifying the collection by adding or removing elements is not, and is the source of many bugs.
|
# ? Dec 4, 2020 05:37 |
|
KillHour posted:Modifying the elements in a loop is extremely common. Modifying the collection by adding or removing elements is not, and is the source of many bugs. Yea agree that modifying the number of things you’re looping over within the list is a big red flag in code. Our new to python friend might not know the difference yet though.
|
# ? Dec 4, 2020 05:44 |
|
CarForumPoster posted:Yea agree that modifying the number of things you’re looping over within the list is a big red flag in code. Our new to python friend might not know the difference yet though. Which is why I wanted to call it out as something not to do, but thank you for helping clarify if it wasn't totally clear what I meant.
|
# ? Dec 4, 2020 05:52 |
I'm coming to the end of a training course on Python 3. I have really enjoyed it, but now as the end looms I worry that I won't use it and will lose what I've learned. I don't have a project in mind. I don't have anything that I want to build right now. My question is, is there a sort of project list--or a collection of exercises-- designed to put what I've learned to the test? Like, exercises for the sake of understanding?
|
|
# ? Dec 8, 2020 18:31 |
|
Kaggle?
|
# ? Dec 8, 2020 18:46 |
|
Sit down with coffee or whiskey. Maybe at home, maybe somewhere quiet outdoor, or maybe at a socially-distanced cafe. Think for a while. Read a hard-sci fi book, or talk with intellectually-curious friends. Find something that should exist, but doesn't, or needs improvement. Think of what's feasible in the sci-fi world, but absent from our own. Think to the things that frustrated you recently. What have you lamented, that could perhaps address instead?
|
# ? Dec 8, 2020 19:20 |
|
There are some sites which use applied programming to solve problems. Project Euler is one if you have an interest in math If you want to learn how modern cryptography works, and how to code break, you might enjoy https://cryptopals.com/ Really, it depends most on what you're interested in.
|
# ? Dec 8, 2020 19:53 |
|
At least in the spirit of the season, there is the Advent of Code. Might test your algorithmic skills more than anything, but it's always pretty fun.
|
# ? Dec 8, 2020 20:05 |
|
Quote posted:I'm coming to the end of a training course on Python 3. I have really enjoyed it, but now as the end looms I worry that I won't use it and will lose what I've learned. Think about some everyday (or week/month/year) thing you you could automate. Doesn't matter if you'll spend more time writing the script than you'd ever save from running it. For example, on my todo list is automatically downloading a copy of new financial statements (bank, brokerage) once a month for safekeeping. It's not hard to do this manually once a year or so, and none of the issuers have an official API so it's not gonna be an efficient use of time, but it's a good excuse to learn and practice.
|
# ? Dec 8, 2020 20:08 |
|
Volmarias posted:There are some sites which use applied programming to solve problems. There's also Rosalind for bioinformatics.
|
# ? Dec 8, 2020 22:21 |
|
Quote posted:I'm coming to the end of a training course on Python 3. I have really enjoyed it, but now as the end looms I worry that I won't use it and will lose what I've learned. Pick a project. What do you like to do? What do you wish existed?
|
# ? Dec 8, 2020 22:55 |
|
Quote posted:I don't have a project in mind. I don't have anything that I want to build right now. I have an email thread to myself I just keep replying to, every time I get an idea Here are some popular ones 1. Twitter for zombies 2. Jira project management clone 3. Web service to send encrypted secrets 4. Markdown to HTML (static website renderer) 5. Pick your favorite board game, then build a CLI version of it. Games primarily based on cards/tokens and no board are easiest (I did Sushi Go! and Jaipur) 6. A UCI compatible chess engine (interface is very similar to talking to an AT modem) 7. Django based blog
|
# ? Dec 8, 2020 23:48 |
|
Edit: Wrong general questions thread LOL
|
# ? Dec 13, 2020 07:42 |
|
Hmm, is there an active topic for making websites/blogs for profit? I remember a thread like that but can't find it right now.
|
# ? Dec 14, 2020 10:22 |
|
I am trying to program a CSV parser in bash. When I check the file in libreoffice write I can see that each "entry" (you'll see why I don't call it line) finishes with a carriage return "↵", the type that libreoffice produces when I push shift+enter. However, for some reason that I cannot understand, the automatically produced CSV files come with a pilcrow sign "¶", (the kind that I get when I push plain enter) at points that look random to me. At first I thought that it might be at about the time a normal A4 page ends, but nope. I think I would be set if I could just erase whatever the pilcrow sign represents. However, looking at unicode and stuff I see paragraph and line separator, both represented by "↵" and associated with the plain enter key. I know how to make a sed and erase all the newlines, but I have no idea what symbol the pilcrow sign would be, or even if there are two symbols and I can erase one or not the other. At least libreoffice seems to think they are different. Does anyone know encodings and stuff and can give me a suggestion? Also, I see powershell threads but is there a bash thread or an "open source shells" thread? TIA
|
# ? Dec 14, 2020 21:44 |
|
Hyvok posted:Hmm, is there an active topic for making websites/blogs for profit? I remember a thread like that but can't find it right now. I would assume that any thread like that would have died around 2010
|
# ? Dec 14, 2020 22:04 |
|
Dawncloack posted:I am trying to program a CSV parser in bash. hexdump -C <file> That will show you the hex encoding for all the characters in your file. Look at an ascii table to see what those numbers mean for certain characters that only show up as whitespace or whatever
|
# ? Dec 14, 2020 22:33 |
|
^^^ you sir, madame or nonbinary being, you are cool. Thanks.
|
# ? Dec 14, 2020 22:55 |
|
Dawncloack posted:I am trying to program a CSV parser in bash. Mostly for my own curiosity, why are you using sed, rather than awk for this task? Awk seems purpose built for this task, and both are preinstalled on most systems
|
# ? Dec 15, 2020 01:32 |
|
|
# ? May 23, 2024 12:20 |
|
Because I havent learnt any awk yet, is the honest answer. I am a stupid newbie. But hey, if you think that I'll force myself to do it with awk. Gotta get there at some point. Edit: now that I think of it, there moght have been a misunderstanding. I was thinking of using sed to eliminate the unwanted line breaks, not for parsing. I was going to parse the csv with read and comparison or something like that. But I bet awk is better. That will be my christmas project. Dawncloack fucked around with this message at 09:43 on Dec 15, 2020 |
# ? Dec 15, 2020 09:37 |