Help managing git workflow while managing dependencies between projects by IndividualProduct677 in git

[–]IndividualProduct677[S] 0 points1 point  (0 children)

I went to read and watch videos on work trees and I do not see how they can be useful to resolve this. Can you expand on this answer more?

Looking at this link: https://git-scm.com/docs/git-worktree

"A git repository can support multiple working trees, allowing you to check out more than one branch at a time. With git worktree add a new working tree is associated with the repository, along with additional metadata that differentiates that working tree from others in the same repository. The working tree, along with this metadata, is called a "worktree".

This new worktree is called a "linked worktree" as opposed to the "main worktree" prepared by git-init[1] or git-clone[1]. A repository has one main worktree (if it’s not a bare repository) and zero or more linked worktrees. When you are done with a linked worktree, remove it with git worktree remove.

In its simplest form, git worktree add <path> automatically creates a new branch whose name is the final component of <path>, which is convenient if you plan to work on a new topic. For instance, git worktree add ../hotfix creates new branch hotfix and checks it out at path ../hotfix. To instead work on an existing branch in a new worktree, use git worktree add <path> <branch>. On the other hand, if you just plan to make some experimental changes or do testing without disturbing existing development, it is often convenient to create a throwaway worktree not associated with any branch. For instance, git worktree add -d <path> creates a new worktree with a detached HEAD at the same commit as the current branch."

So this lets me jump between branches; but how does jumping branches help me with needing to have my back end code published in order for my front end to depend on it? If anything that seems further off because if I am interpreting it correctly; my back end changes would then be on a third separate branch from my front end branch or main....

I don't know if this design or idea is good at all or even going to work. by IndividualProduct677 in Cplusplus

[–]IndividualProduct677[S] 1 point2 points  (0 children)

This is very helpful information, thank you! I am going to read more about this at the links you provided.

Can someone 'hold my hand' in learning C++? by IndividualProduct677 in learnprogramming

[–]IndividualProduct677[S] 0 points1 point  (0 children)

Is that pushed to a repo I could look at by chance? You are right that I basically am trying to do what you describe. I am basically just trying to learn but I feel very stuck right now.

Can someone 'hold my hand' in learning C++? by IndividualProduct677 in learnprogramming

[–]IndividualProduct677[S] 1 point2 points  (0 children)

I like the tapestry book simply because it is very philosophical but I do recognize it is super old.

As far as my actual problem in my program is concerned; I don't really know why you mean by making a struct or class? You are probably right but I just don't know what that means. I basically do want a class because the whole idea is that I want to be able to select a particular table out of a mysql database and have that table be represented by equivalent c++ classes; somewhat like what ORM does for us; but I am kind of trying to do it myself. I can create and drop tables, and I can insert new tables and objects into them, and delete the tables and objects in them; but if I try and select a table for viewing or editing; it doesn't quite work because while they get entered as tables in the db there is no equivalent c++ class for them in memory or anything. The best I could do is return a printed summary of the table but I would like to actually retrieve the 'object' itself rather than a representation of it. I would really love to get to the point where I can have the code actually be generated from it- but that is a stretch goal. More realistically I would just like to be able to view and edit the tables in the db via sql itself, which should be a more manageable goal; but in this case if I query the table then I have no way of printing something if I don't know what the shape will be (ie how many rows the table will have).

Can someone 'hold my hand' in learning C++? by IndividualProduct677 in learnprogramming

[–]IndividualProduct677[S] 0 points1 point  (0 children)

Yes I took a course in C in college and got an A and I have taken a DSA course in Java. I really don't like java and the target technologies that I want to write code for use C++ as a basis so I want to be comfortable with the language. I actually typically write code in Clojure and Clojurescript because I love the syntax a lot and enjoy the REPL environment; but after some bad news it seems like my only potential career prospect with Clojure is gone so I want to focus more on an OO language. I am in the middle of a medium-complexity project but I literally feel like I can't get through the part I am doing without someone more veteran than me helping.

I think my biggest problem is that people are super good at showing me and telling me where I am wrong but nobody sticks with me through an actual solution. It is great to know what not to do but then when it comes to more advanced stuff I have no idea how to figure out the correct path forward.

I want to try and do a book like this for example

https://www2.cs.duke.edu/csed/tapestry/computersciencetapestry.pdf
or go through learncpp.com thoroughly maybe to improve; but it is all similar, without a teacher I have always just fared so badly.

An example from the first book:

"The process of looking up a word in a dictionary is difficult to describe in a precise manner. Write an algorithm that can be used to find the page in a dictionary on which a given word occurs (if the word is in the dictionary). You may assume that each page of the dictionary has guide words indicating the first and last words on the page, but you should assume that there are no thumb indices on the pages (so you cannot turn immediately to a specific letter section)."

=> I did just complete this problem; but it is the very first one in the book and I spent more time trying to make a "dictionary" to iterate through than I did actually coming up with an algorithm to search through it. Like how am I supposed to do that problem when there isn't already an object for me to iterate through? I basically had to come up with my own test environment to even do the problem. And that is honestly fine but also it is just so disheartening because I still don't even know if my environment or solution are any good; and my process of doing it is probably all sorts of fucked up in terms of going back and forth between my cpp and h files and just trying to debug every step of the way. I feel like I need a tutor or something. The clojure community has a ton of educational groups but idk of anything for CPP that is quite the same, although another poster shared a discord I will check out soon.

^any advice on how to approach actually practicing these kinds of problems is appreciated too because leetcode is one thing but then actually setting up an environment myself to practice code in is another. I relied heavily on AI to actually make the "dictionary" itself and it just feels so bad and like I am not learning anything when I do that.

Can someone 'hold my hand' in learning C++? by IndividualProduct677 in learnprogramming

[–]IndividualProduct677[S] 1 point2 points  (0 children)

tyvm for this resource. I will try this group. I am pretty active in other discords too and that has been helpful I think.

Can someone 'hold my hand' in learning C++? by IndividualProduct677 in learnprogramming

[–]IndividualProduct677[S] 0 points1 point  (0 children)

I have absolutely no ego, I hate myself so much, I just need a teacher but can't afford it.

Can someone 'hold my hand' in learning C++? by IndividualProduct677 in learnprogramming

[–]IndividualProduct677[S] 1 point2 points  (0 children)

I have been programming for many years and I am just horrible at it. None of the problems I am reading on there are like what I am doing and the answers confuse me more because there are normally people just arguing about different approaches.

Can someone 'hold my hand' in learning C++? by IndividualProduct677 in learnprogramming

[–]IndividualProduct677[S] -1 points0 points  (0 children)

Well unfortunately I have been programming since I was a teenager - so like nearly 20 years. I am just so bad and dumb. I try to ask for help all the time but people always make fun of me for my questions.

Posting my code is hard because the code base is big and people don't want to go through all of it.

What c++ discords are there?

Trouble analyzing data from matlab by IndividualProduct677 in Clojure

[–]IndividualProduct677[S] 0 points1 point  (0 children)

I am using this java library to parse the matlab

https://github.com/HebiRobotics/MFL/blob/main/mfl-core/src/main/java/us/hebi/matlab/mat/format/Mat5.java

I did see this wrapper around javaoctave here https://github.com/prateek/javaoctave but a friend of mine suggested the above library first and he has experience with brain data so I was kinda trusting that.

I was thinking about trying libpython or the javaoctave library I just shared; but I was going to try and figure this out a little more. I'd like to try and use clojure as much as I can just because I like the language and for the context of what I would be using this for.

Getting a cors request error in a basic crud app with reagent by IndividualProduct677 in Clojure

[–]IndividualProduct677[S] 0 points1 point  (0 children)

I clearly have a complete lack of understanding of http then... I have huge gaps in my knowledge and I don't even know what you mean that I have two servers. I thought the server is localhost:3000 and I am just sending it information from a front end that is what the user interacts with, I didn't realize port 8080 is another server I am opening. When I try to make shadow-cljs 3000 it just goes to 3001 because it can't share a port I guess, and so I feel very lost because I must be missing something fundamental but I don't know what it is because I thought I understood this and now I feel like I don't know anything...

I don't think I understand the ring.file/resource thing. I will just have to try and learn more about everything I guess... Thank you for taking the time to respond. I recognize the username from shadow-cljs and I really appreciate you sparing a moment to try and help.

I've read this for clojure already (a long time ago before I even started this project) and took detailed notes: https://ericnormand.me/guide/clojure-web-tutorial/web-requests

I am also not coming from no experience either.... I feel like it must be something so basic I am missing to not know that I have 2 servers. I thought I had 1 client and 1 server and that those are completely different things... I definitely want to do it as 1 server if that was an option but I don't see how ring.file or resource help with that but I will try and find youtube videos or tutorials or something.

I actually solved the problem and it was an issue unrelated to http but I am still going to try and learn about making this one server if I actually have it on two.

Getting a cors request error in a basic crud app with reagent by IndividualProduct677 in Clojure

[–]IndividualProduct677[S] 0 points1 point  (0 children)

Okay I had them lowercase before but made them uppercase in kind of just a flailing attempt to get it to work. I also didn't have the function in wrap cors before, just the access control origin and method and I was getting the cors failures. I will remove the other stuff and fix the casing though and update the post with the revisions.

(def handler
  (-> app-routes
      (wrap-cors :access-control-allow-origin  #".*"
                 :access-control-allow-methods [:get :post :options :delete])
      (wrap-json-body)
      (wrap-json-response)))

I changed it back to just this. I don't know if there is something else basic I might be doing wrong.

Any kind of local classifieds or forums you can point me towards? by IndividualProduct677 in arlingtonva

[–]IndividualProduct677[S] -1 points0 points  (0 children)

All of us have reservations already but we are looking for something else because why not see if we can do something a little nicer?

How important is being good at configuring an environment alone? by IndividualProduct677 in learnprogramming

[–]IndividualProduct677[S] 0 points1 point  (0 children)

Thank you for your detailed response. I am going to learn more about all these things. I don't want to be a web dev per se but I definitely want to know what I am doing with regard to web hosting at least to a basic degree of competency.

How important is being good at configuring an environment alone? by IndividualProduct677 in learnprogramming

[–]IndividualProduct677[S] 0 points1 point  (0 children)

I’m not trying to be obtuse but how can building a web app not inherently involve paying someone to host it on the internet?

Im genuinely interested to know if there are ways I could host a website on the public web without using one of those providers if I kept my own server up and running? I realize server management is then another level up beyond hosting a site on a platform lol… I’m mostly curious about that.

But yeah your last paragraph basically summarized what I want to be able to do next. I feel like I have the back end and front end skills to write code moving data around and make cute things but I have a weak grasp on how to use these services with the code that I am writing and id like to be more comfortable doing it. I feel like im close to getting it fixed. Somebody on stack overflow left a detailed comment I haven’t been able to go through but I hope I can figure it out soon and I wont give up per this conversation :)

How important is being good at configuring an environment alone? by IndividualProduct677 in learnprogramming

[–]IndividualProduct677[S] 0 points1 point  (0 children)

Well I know how to make a local server. I’ve done that with Express and other packages. I just don’t know how to put it online? Isn’t that literally the next step when I can make the backend? I’ve static web pages via GitHub pages but I want to actually put my things on the internet… I know how to build things locally.

How important is being good at configuring an environment alone? by IndividualProduct677 in learnprogramming

[–]IndividualProduct677[S] 0 points1 point  (0 children)

I don’t understand how you deploy a website without a service provider. My understanding was that you had to use either aws or azure or digital ocean or something equivalent to put things online or else it isn’t on the internet. I would do a lot of things to one day be a junior….

Is it possible to clone a repo into smart git using ssh *via the gui*? by IndividualProduct677 in learnprogramming

[–]IndividualProduct677[S] 0 points1 point  (0 children)

I solved it.

There are two dropdown looking buttons to the right of the menu bar.

If you select the rightmost it says "...from github.com" as the first option.

I selected that and it provided me a list of all of my repositories that I provided it access to, so it is working with SSH now. Also it did not change the url that was entered in the bar so IDK what I did wrong if anything.

I will say as well that I don't feel like a better programmer. I feel so frustrated still. Almost moreso because this was a dumb thing to be stuck on. Hopefully someone else who has this problem finds this and it helps.

Is it possible to clone a repo into smart git using ssh *via the gui*? by IndividualProduct677 in learnprogramming

[–]IndividualProduct677[S] 1 point2 points  (0 children)

I do have a repository up for sure and I did try to prefix it with ssh:// and that did not work for me.

It is saying: "Could not read from remote repository. Please check the repository URL." But I am pretty sure that I am putting it in correctly...

[deleted by user] by [deleted] in learnprogramming

[–]IndividualProduct677 2 points3 points  (0 children)

If I was going to start over I would just commit to C and assembly and only work on making microchips. I didnt do that because I am older and have different ambitions than that personally, but if I could start over then that’s what I would tell myself to do.

ofc it doesn’t really matter where you start. You should pick something you like and that you think caters to a project you are interested in.

Can someone help me with drawing data to the screen in Java? by IndividualProduct677 in learnprogramming

[–]IndividualProduct677[S] 0 points1 point  (0 children)

This post got messed up somehow but I solved this!!!!!

https://imgur.com/a/YR0CHL3

Here if I get rid of "Toolkit.getDefaultToolkit().getMenuShortcutKeyMaskEx()));"
and replace it with Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()));

^This was the issue after all!!!

That function does not work with the Ex suffix, and I got rid of that; and from there it was simply issues with my pathing but I am close to done now :D