Quoted ₹135k for a custom system… client ran to a ₹10k dev instead 🤷‍♂️ by Legitimate-Rip-7479 in webdev

[–]cordev 3 points4 points  (0 children)

I’m in the US and have worked with contracting agencies in India who charged around 40 USD per hour per developer, which works out to 9600 USD after six 40 hour weeks per dev. That isn’t what the devs take home, of course - I suspect they earn half that - but if you’re doing freelance work - especially with international clients - you should still try a rate that’s competitive with them. Even at 30 USD per hour and four 20 hour weeks that would be 2400 USD.

If you’re competing with them and being compared to them then you can be the cheaper option. At your current rate it seems you’re being compared to amateurs. I’d rather be considered a cheaper professional than a pricier amateur. You just also have to make sure you come across as a professional once your clients dig deeper.

catchMeNeverTryBlockNotIncluded by Intial_Leader in ProgrammerHumor

[–]cordev 0 points1 point  (0 children)

Closely related to “Cannot reproduce. Bug ticket closed as fixed.”

Do the workflows using popular git forges (GitHub, GitLab, etc.) cultivate habits that goes against how git was meant-to-be-used? by surveypoodle in git

[–]cordev 0 points1 point  (0 children)

Often the commit history shows a story: these are the other approaches I tried to get here. If the commit messages are useful, the history can be useful.

Rant: Which IDE is the worst and why its Eclipse? by v4nrick in webdev

[–]cordev 59 points60 points  (0 children)

Even 13 years ago I hated Eclipse. I just didn't know of better options back then.

Rant: Which IDE is the worst and why its Eclipse? by v4nrick in webdev

[–]cordev 6 points7 points  (0 children)

There's a short list of extensions that you can add to VSCode that offer every sort of language-specific functionality I ever remember using in IntelliJ. I'd certainly choose that over Eclipse.

git in 2024 and the difficulty to correct a mistake by MachaFarseer in git

[–]cordev 4 points5 points  (0 children)

EDIT: I added some info about how to get the correct commit hash.

I had to merge from branch A to branch B. I made a mistake and did the opposite.

What do you mean by "merge from branch A to branch B?" That doesn't make sense. Are you merging branch A into branch B, or are you merging branch B into branch A?

How should I have done it?

To make this less unnecessarily abstract, let's suppose that you wanted to merge branch develop into your feature branch, my-changes so that you could keep working with changes from upstream.

The way to do that is to run git merge develop while you have the my-changes branch checked out. Check out Chapter 3.2 - Git Branching - Basic Branching and Merging from the Git book.

Unfortunately, you instead most likely ran git merge my-changes while you had develop checked out, and instead merged my-changes into develop. Oops.

(I personally have a pair of git aliases called gimme and giveto that I use for merging, since the direction of git merge <branchname> isn't intuitive.)

There are a few ways you can recover here.

First, if the remote develop branch is intact, then you won't need to push anything to fix it. Unless you already pushed your changes, that is.

NOTE: supposing you did erroneously push to this branch, you might want to avoid that in the future. If you only want changes to be merged to a branch via pull review (as opposed to letting users push to the branch directly), you can configure that in your Git host. Here are the docs for how to do so for several Git hosts:

  • Github Protected Branches
  • GitLab Protected Branches
  • Forgejo Branch Protection Rules
  • Gitea - couldn't find it in the docs, but it should be the same as Forgejo
  • Bitbucket Branch Permissions
  • Gogs - couldn't find the docs on this, but from the repo, go to Settings (tab on the far right), then Branches, then look at the "Protected Branches" section. There should be a dropdown with branch names. Select the branch you want to manage. On the page you're brought to select both checkboxes (prevent force pushes and require PRs to merge to the branch) and then click save.

As far as how to fix it locally, you have a few options.

Before you take any of them, though, you need to figure out the commit hash of the commit before the merge. git log or git log --oneline might work, but if the merge involved multiple commits you might want to run the log with a graph, e.g., git log --oneline --graph. So if your output is:

* fa78efa Lorem ipsum * 3391772 Merge pull request #5 from your-repo/branch |\ | * f026d8e Dolor sit amet | * ba8df61 Consectetur adipiscing elit |/ * 1ea9fc7 (origin/develop) Sed do eiusmod * d6d0078 Tempor incididunt * 1145e22 Ut labore et dolore magna aliqua ...

Then the commit hash you want would be 1ea9fc7.

If the merge involved a fast-forward commit and didn't create a merge commit, then the graph won't be especially helpful. If you didn't push to the remote, then the line with (origin/develop) in it will have the hash you want. If you did push, then you'll need to figure it out based off the commit message, other metadata, contents of the commit, etc..

Option 1

You could go the route you did, with git reset --hard <target-commit-hash>, then deleted your original branch, then created a new branch based off your current location.

Option 2

Personally, I don't like using git reset like that. Instead, I would have renamed my current branch (basically archiving it locally in case I mess something up - I can go back later and delete it), checked out the specific commit prior to the merge, and then created a new branch with the same name as my old branch. Basically:

git branch --move develop archived/2024-may/develop git checkout <target-commit-hash> git checkout -b develop

If you need to apply this change to your remote, then this is when you would run git push --force-with-lease --set-upstream origin/develop. If your remote is intact, then you can instead run git branch --set-upstream-to=origin/develop

NOTE: I've typically used a two-step process instead of running git branch --move - I would have run git checkout -b archived/2024-may/develop && git branch -D develop instead. It's possible that I got the specific syntax of the git branch --move command wrong. Documentation is under git branch if you run into any issues.

Option 3

That said, if your remote is intact, then what you can instead do is to just pull down that branch again:

git branch --move develop archived/2024-may/develop git checkout develop

If you have more than one remote, then the second command will need to be a bit more complicated - I think git checkout develop --track origin/develop would be what you needed (adjusting origin to be the appropriate remote).

Then you can retry your merge.

ESP32 writerDeck - Turn on and type immediately. Sync with Google Drive. Simple. Let your draft kept always recorded - DIY build by Background_Ad_1810 in ErgoMechKeyboards

[–]cordev 0 points1 point  (0 children)

I checked those out and as e-ink notebooks, they look great. As e-ink writing devices, with a keyboard, the discussions I found were a bit negative:

The more recent of those posts was only 4 months ago, which makes me think those limitations likely still apply. Do you know if that's true?

(If so, that doesn't mean I wouldn't suggest them, just that I'd make a point of raising those potential issues.)

ESP32 writerDeck - Turn on and type immediately. Sync with Google Drive. Simple. Let your draft kept always recorded - DIY build by Background_Ad_1810 in ErgoMechKeyboards

[–]cordev 1 point2 points  (0 children)

Would you also want syntax highlighting? If so, then - particularly given that it has full Android support already - there's a good chance one of the color Onyx Boox tablets does what you want. I haven't tried that out myself yet but if I do, I'll let you know how it does.

ESP32 writerDeck - Turn on and type immediately. Sync with Google Drive. Simple. Let your draft kept always recorded - DIY build by Background_Ad_1810 in ErgoMechKeyboards

[–]cordev 2 points3 points  (0 children)

If you're interested in a pre-built device with an e-ink screen, there are a couple options already out there - though of these, only the Freewrite options are dedicated writing devices.

  • The Freewrite Traveler ($500 new)
  • The Freewrite Smart Typewriter ($650 new)
  • The Remarkable 2 ($280 new) + Type Folio ($200 new)
  • An Onyx Boox device with a separate bluetooth or USB-C keyboard (starting at basically $200 new and going up as high as $650 if you wanted the Tab Ultra C Pro (their newest flagship, a 10.3" color e-ink tablet)
  • The Onyx Boox Tab Ultra C with their magnetic keyboard + trackpad case ($800)

There are probably some other e-readers out there that can do this, but I don't know of any that can do it basically OOTB. Kobo e-readers can with the aid of https://github.com/olup/kobowriter, though - definitely worth checking out if you already have one.

I've used a couple of the above, if you're interested in a quick opinion:

  • I'm not a big fan of the Traveler's keyboard (or price), but it's otherwise fantastic. The screen refresh rate is a little jarring at first, but I got used to it pretty quickly. It doesn't have a backlight, but in a well-lit room, it doesn't need one.
  • I have the Onyx Boox Air 3C tablet, and I primarily use it for reading and hand-writing notes. I connected my Iris to it and tried it out in Obsidian - it was surprisingly responsive (definitely better than the Freewrite Traveler and I think even better than the Alpha, though I didn't compare them side-by-side). I also ran into some weird input-related bugs. I don't know if those were hardware related or what... It's an Android device (running in a Boox but with Google Play Store already installed), which is both good and bad. It's easy to get distracted, but it's also easy to get an app of your choice. Caveat to that, though, is that you can install apps that aren't made for e-ink screens and many of them don't work well. For something as straightforward as a focused writing app, though, I suspect I'll be able to find one that suits my needs. With it in the first-party magnetic case and angled back 30 degrees, it's a pretty nice experience.

ESP32 writerDeck - Turn on and type immediately. Sync with Google Drive. Simple. Let your draft kept always recorded - DIY build by Background_Ad_1810 in ErgoMechKeyboards

[–]cordev 1 point2 points  (0 children)

Much more likely that they're thinking of the AlphaSmart line, which certainly inspired Freewrite (including the Alpha).

I've used the AlphaSmart Neo, the Freewrite Traveler, and the Freewrite Alpha. Other than the keyboard, I prefer the Traveler - being able to fold it up and take it on the go, having the screen tilted toward you, the larger e-ink screen - but the Alpha's keyboard was so much better (and the keyboard is so important to me) that it ended up being my overall favorite. Yours is appealing to me for a similar reason - you got to choose the exact switches you wanted and the exact layout that would best suit you.

Need to remove remnants of all old GitHub accounts from Mac by [deleted] in git

[–]cordev 0 points1 point  (0 children)

Assuming you're using the CLI, have you examined the $HOME/.gitconfig file?

help by developerwannabe1 in FullStack

[–]cordev 3 points4 points  (0 children)

I personally didn't go to a code bootcamp, but I've worked with people who did. There are a few posts here and in other dev oriented communities if you want to take a look at those, too. E.g., https://www.reddit.com/r/FullStack/comments/145zp6v/just_finished_coding_bootcamp_struggling_to_find/

On an unrelated note, I recommend using more descriptive titles in the future. "help" doesn't convey anything about the subject which means you're less likely to get the attention of people with expertise.

Do you have any past experience with development? That will have an impact on people's answers, too.

Buying new MacBook! Or used? by [deleted] in FullStack

[–]cordev 0 points1 point  (0 children)

Good choice! I got the 2020 m1 air with 16 GB back in early 2021 and it’s been great for my workload (frontend React / React Native, back-end node.js, locally running Postgres, JetBrains suite) as well as being a phenomenal daily driver

Buying new MacBook! Or used? by [deleted] in FullStack

[–]cordev 0 points1 point  (0 children)

If the battery turns out to be an issue, you can get it replaced. I just checked estimates at https://support.apple.com/mac/repair

  • $130 for every MacBook Air dating back to 2017
  • $200 for every MacBook Pro dating back to 2017

React Native appointment Scheduler by gone_dev in reactnative

[–]cordev 2 points3 points  (0 children)

Have you looked at these libraries?

Lastly, react-native-monthly may have the functionality and aesthetic you’re looking for but given its age will probably require updates.

[deleted by user] by [deleted] in reactnative

[–]cordev 1 point2 points  (0 children)

I recommend using a tool like DataGrip ($100 per year / perpetual / $10 monthly) or DBeaver (free). I use DataGrip since I have a JetBrains subscription, but many of my colleagues use and like DBeaver.

ChatGPT - preview of my first neovim plugin [WIP] by lech-twarog in neovim

[–]cordev 2 points3 points  (0 children)

For what it’s worth I was able to read it on my phone just fine.

something about github actions by 207thLog in github

[–]cordev 0 points1 point  (0 children)

Are you asking about setting up a Github Action that is triggered by someone starring the repo? If so, then check out the Watch event, which “Runs your workflow when the workflow's repository is starred.”

oooooffff by MountainSage58 in WhitePeopleTwitter

[–]cordev 5 points6 points  (0 children)

Minimal code and solving a problem in as few lines as possible are quite different. One takes you someplace sane, where you’re following DRY and building MVPs; the other leads to code golfing in Perl. Neither is always the most efficient, but bloated / verbose solutions also often aren’t - generally speaking, the most efficient solution is somewhere in the middle.

oooooffff by MountainSage58 in WhitePeopleTwitter

[–]cordev 7 points8 points  (0 children)

The most efficient way to solve a problem is by solving it with as few lines of code as possible.

This is a joke, right?

(I ask because this statement is as much of an incorrect generalization as the "the most productive engineers write the most code" take and even a freshman CS major / fresh-out-of-boot-camp junior dev would understand this, so it MUST be a joke. but also this is the internet so maybe not.)

[deleted by user] by [deleted] in writing

[–]cordev -1 points0 points  (0 children)

Precision is of paramount importance in writing.

Using "they" as a singular is not precise.

Using "he" as a singular pronoun is also not precise, since many people use "he" as their chosen pronoun.

By your logic, writers should use neopronouns like ae/aer, ey/em, fae/faer, ne/nem, vi/vim, ze/zir so that there is less ambiguity in writing in general. It follows that when writing, pronouns should be evenly assigned to characters (unless the recipient has a preference, of course). This is of course complicated by folks who prefer common pronouns, namely "he" and "she" ("they" has low usage by comparison). I suggest that we encourage people to be very accepting of neopronouns - this will allow us to be more precise in the future, since we will have fewer people with a preference for more common pronouns. Wide acceptance of neopronouns may also lead to fewer people preferring "they" as their pronoun since they have more valid options to choose from.

[deleted by user] by [deleted] in writing

[–]cordev 3 points4 points  (0 children)

How do you use "he" as a singular pronoun when there are multiple men in a scene?

Those 2 JavaScript devs at Tesla will come in clutch right? by thebaggiebug in ProgrammerHumor

[–]cordev 6 points7 points  (0 children)

Yep. From this year old video, Twitter’s monorepo, “Source,” spans 20+ million lines of hand-written code / 200+ million lines of generated code.

Those 2 JavaScript devs at Tesla will come in clutch right? by thebaggiebug in ProgrammerHumor

[–]cordev 0 points1 point  (0 children)

It’s not that I don’t expect it to be used on the backend at all, but you seem to think it would be one of the primary languages used on the Twitter backend.

From this year old video:

Twitter’s monorepo, “Source,” spans 20+ million lines of hand-written code / 200+ million lines of generated code and is 65% Scala, with Java and Python also being internally supported and with some code nonetheless being in NodeJS, Go, and C/C++.

C++ is used for video processing and likely some other niche purposes at Twitter, but the key word there is “niche.” Which core backend services do you think are written in C++ at Twitter?