The Big Programming Thread - Page 972
Forum Index > General Forum |
Thread Rules 1. This is not a "do my homework for me" thread. If you have specific questions, ask, but don't post an assignment or homework problem and expect an exact solution. 2. No recruiting for your cockamamie projects (you won't replace facebook with 3 dudes you found on the internet and $20) 3. If you can't articulate why a language is bad, don't start slinging shit about it. Just remember that nothing is worse than making CSS IE6 compatible. 4. Use [code] tags to format code blocks. | ||
Manit0u
Poland17046 Posts
| ||
Excludos
Norway7685 Posts
On September 15 2018 09:40 Manit0u wrote: Purely a design question. Imagine you have a single system (console application for example). You have multiple objects in there but would like to keep them updated regularly based on a global timer (think heartbeat). Do you think that a pub-sub could do that? Then you'd just need one class that would broadcast a heartbeat event at regular intervals. Depends a bit on what type of pub/sub system you're using, but generally yes. Some pubsub systems have spesific implementations to do exactly this. | ||
Manit0u
Poland17046 Posts
And I don't really have a specific plot or anything in mind. I am more interested in creating a basic platform for creating text adventure games with quest and combat systems etc. | ||
solidbebe
Netherlands4921 Posts
On September 01 2018 05:59 travis wrote: so, my buddy is in the air force, he is doing a CS program online through Regis University. He sent me his homework assignment. It is due Sunday, he just looked at it. His class started on monday. Quick note: he has no experience with C, and no experience with automata Here is the assignment (pdf): https://ufile.io/ituhz Is this not completely absurd? I saw this and I started laughing and told him he's screwed and his teacher is insane. But maybe one of you has a different opinion? But just to go over it, they expect him to understand what a DFA is, how to make the DFA correctly, and how to do literally all those things in C. All in well less than a week. Curious about opinions on that. The assignment says youre not allowed to use any predefined structures like linked lists and that you should implement your own. If the students are not on a level where that would be trivial, then this assignment looks way too difficult. If they are, then it's just tedious. I also hope they just took DFA's as an arbitrary subject for an assignment and not because they are teaching DFA's along with programming in C. Because those two things have nothing to do with each other. | ||
mantequilla
Turkey773 Posts
| ||
phar
United States1080 Posts
On September 16 2018 10:17 mantequilla wrote: I know it may sound like a dumb question but is neurocomputing a CS or EE heavy course? Probably depends on the specific course. I would hazard a guess that it's not much to do with EE. I would guess it's quite a bit of linear algebra. But, look at the curriculum to get a better idea. | ||
phar
United States1080 Posts
On September 14 2018 11:52 Thaniri wrote: Coming from Java this seems pointless when my compiler should know that I only have one Card struct. It's not like I rewrote the math package and need to specify that I want to use MY math package instead of the default math package. Bear in mind where golang is coming from. For sufficiently large codebases, ambiguity is the fucking devil, so making an explicit requirement about using fully qualified packages isn't outrageous in that context. It may seem obvious to you now which Card is which, but what about some random dev 4 years from now who had to go cave diving into your old code? The more pointers they have about what exactly you're talking about, the easier of a time they're gonna have. Google C++ also generally prohibits the "using" keyword, which is the same-ish idea. | ||
Qwyn
United States2778 Posts
On September 01 2018 05:59 travis wrote: so, my buddy is in the air force, he is doing a CS program online through Regis University. He sent me his homework assignment. It is due Sunday, he just looked at it. His class started on monday. Quick note: he has no experience with C, and no experience with automata Here is the assignment (pdf): https://ufile.io/ituhz Is this not completely absurd? I saw this and I started laughing and told him he's screwed and his teacher is insane. But maybe one of you has a different opinion? But just to go over it, they expect him to understand what a DFA is, how to make the DFA correctly, and how to do literally all those things in C. All in well less than a week. Curious about opinions on that. That's kind of insane. As tofu said, generally a data structures/algorithms class is a prerequisite for 300-400 level classes on formal language theory. Most schools will begin teaching you C/C++ around the same time you take a "real" class on algorithms (or operating systems). If he's only in his second year, are you sure he signed up for the correct class? This seems like a bit too much to ask for a second year student who has never been exposed to C/C++ before. IE, my OS class got us warmed up to C by building a shell. The DFA part of this seems perfectly reasonable, but if you're just starting to learn about C you're gonna be freaking out about pointers and malloc/free and all that sort of stuff. However, if this really is a higher level class and your buddy bit off more than he can chew (and as tofu said)... This does seem fairly reasonable for any class on formal language theory. For a senior student, that it is required to be written in C is more tedious than anything else. Since it has been a couple weeks, how did his code end up looking? What did he learn? | ||
shz
Germany2685 Posts
Productive day @ work... | ||
tofucake
Hyrule18772 Posts
aren't those mutually exclusive? | ||
shz
Germany2685 Posts
| ||
Manit0u
Poland17046 Posts
On September 19 2018 03:16 shz wrote: Productive day @ work... https://chris.beams.io/posts/git-commit/ Required reading | ||
Qwyn
United States2778 Posts
Great read, thanks for sharing! And shz I can practically taste the frustration from those commits. | ||
Mr. Wiggles
Canada5894 Posts
Essentially you use git tools (interactive rebase, etc.) to rewrite your private history before changes are pulled into upstream so that the commit log is readable, understandable, and doesn't contain broken or extraneous commits. It's pretty useful for several reasons and helps avoid stuff like: - Make the change - Fix the change - Other work - Fix the change fix - Spelling errors in other work | ||
emperorchampion
Canada9495 Posts
| ||
Excludos
Norway7685 Posts
| ||
WarSame
Canada1950 Posts
| ||
Manit0u
Poland17046 Posts
This is something I'm using quite often. Another useful thing is cherry-pick (when you want to commit stuff separately as it doesn't make sense to have them as a part of one commit). You only have to remember that after rebase you need to push --force to your branch. Edit: Some other tips: Do not, ever, add compressed files to your repository (some .zip or whatever) since Git cannot track those well and your repository will grow to several GB in no time. If you have a very big repo (4GB+) you won't be able to clone it via https (might be an issue on systems where you don't get ssh access to the repo). It's useful to clean up your repo from time to time. Usually this involves commands like git gc --aggressive --prune=now and git repack -ad. If you do end up with very large repo due to too many binary files, you can always clean it up: https://github.com/18F/C2/issues/439 https://gist.github.com/dustinschultz/3289951 | ||
Silvanel
Poland4601 Posts
git commit --amend | ||
Manit0u
Poland17046 Posts
Interesting read on how and why some projects are getting out of C++. | ||
| ||