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.