« First « Previous Comments 18 - 57 of 95 Next » Last » Search these comments
People seem to INSIST on using cloud storage
I don't understand "No CPU can have one more or one less job running next to it" - doesn't this mean that all CPU's have to be running the same number of jobs as every other CPU?; and that all additional verbiage is just to confuse the issue?
My answer would be the Kth CPU runs the same number of jobs as every other CPU.
Can I solve this question in an hour? Yes. Actually, I have:
richwicks says
People seem to INSIST on using cloud storage
Are they merely using cloud storage? Most people are using cloud services, which includes storage, search, database, and now AI! If you're trying to encrypt the data stored in the cloud, then those other services will need to be able to decrypt in order to work on your data.
Patrick - New Bug:
I'm just clicking "quote" on a post - can't do it.
richwicks says
Patrick - New Bug:
I'm just clicking "quote" on a post - can't do it.
richwicks, not a bug.
There needs to be a limit on quote size. Before, I was trying to abbreviate the middle of an excessively large quote, but that caused problems with html parsing.
So my new solution for a too-large quote is to ask the user to select something smaller.
If you click "quote" without selecting anything in your example, that's too large. So you should select a portion of the comment, and then click quote.
Let me know if I misunderstood you.
So, I have a sophomore student in Computer Science at OSU. Which programming languages should he learn? And how?
In you solution, where is the preferred CPU listed? It DOES make a difference as I've shown here:
index
.
Hmm... I marked the below as code, but it's not honoring the all-important indenting. I'll add some dots instead.
I believe this solution can be made with a single calculation, with 3 edge cases
richwicks says
I believe this solution can be made with a single calculation, with 3 edge cases
Perhaps your problem is different than the LeetCode one, but I don't think so.
Here's my understanding of a simplified version of the problem you had...
Suppose, for simplicity, the 0th CPU was the special one. If you give it 8 jobs then the whole set of CPUs get 8, 7, 6, 5, etc. jobs. The catch is that every CPU after the 7th needs to get 1 job (the minimum number of jobs) — not 0, -1, -2, -3, etc. So the distribution of jobs is non-linear and so the solution is not a polynomial. When the binary search "guesses" an answer, it can verify in constant time, so the algorithm runs in log(n) time. That might be "sloppy," but if the count of CPUs and count of jobs each fit in a 64-bit integer, logarithmic time will be nearly instantaneous on the worst possible input.
Have them learn a very low level language like assembly (useless) to understand what the machine does.
If you were starting from scratch, what would you use to create a commercial website?
Don't invest time in a re-write unless you will gain some significant improvements for your clients, increase your reach, something tangible that improves your bottom line. Worst case you have some massive security issues or you have spaghetti code you have to keep adding to that will make your site impossible to update, then you might have to consider it just for maintenance, but hopefully you've laid a better foundation than that
If the data model is good, and the enterprise is happy with it. Then the best and quickest way to do a rewrite is to use Code Generating SQL against the tables. I can stub out a whole Enterprise suite in under a week. Then only need to write the business logic layer and the client Scripts.
Always do a rewrite. Normally by time you are called to bring a Customer's software to the next level. The previous developer had already coded the project into a hard corner. And the new business requirements would be impossible to factor in without creating a buggy broken system.
met the same trap, because you understood, what it was doing, how that process got added on after the fact. And you understand what it does and why it's important.. You can then figure how to gracefully make that process. You can make some of your most elegant impressive code you ever did. And in many ways, you owe it to the previous guy, and the problem he was faced with. That you then built on and made it work.
Most migrations and updated enterprise rewrite development lead, do not understand that process today.
BTW: C++ has improved VASTLY since I last used it. It no longer sucks!
richwicks says
BTW: C++ has improved VASTLY since I last used it. It no longer sucks!
Funny you should say that. The current C++ redistributable somehow omits the msvcr100.dll which causes a graphics program I loaded yesterday to not run. Once I figured that out it was just a copy and paste from a computer that still had that dll.
I am never going to work under Windows again, ever.
richwicks says
I am never going to work under Windows again, ever.
I hear you, but the software I like will not run on Linux, and Apple is just a pricey way to do the same thing.
If you were starting from scratch, what would you use to create a commercial website?
You have to learn many high level languages, and a few lower level languages. You don't have to learn higher level languages well, it just introduces you to many concepts which you can implement elsewhere. The concept of a class in C++, brilliant idea, but it's trivial to implement that in C. You're just passing around a pointer to a C structure to every function. There, that is basically C++. C++ used to be nothing more than a preprocessor for C - it took in the C++ code, and through a bunch of macros and conversions, made a C file, and compiled that.
The hardest part for any Enterprise software, is getting it to the point to where it is now.
Student is already registered to take assembly language in Fall 2023. Thank you for the recommendation.
I found your comment quite insightful. Yes, we've added many things after the fact because these add-ons were not envisioned at the time. Mission creep has to stop at some point also.
How can a sophomore in computer science learn Enterprise software?
A common mistake for mission creep is what I call "the Fred exception"
Nothing wrong with the Fred exception if you charge for it, and make it clear any additional work needed for the Fred exception will be treated to a separate bill. That way you avoid endless customized maintenance for free.
Nothing wrong with the Fred exception if you charge for it, and make it clear any additional work needed for the Fred exception will be treated to a separate bill. That way you avoid endless customized maintenance for free. And I mean to the level that when you do a major refactor, if Fred's shit doesn't work anymore, you invite Fred back into the core product fold, or Fred pays again...
« First « Previous Comments 18 - 57 of 95 Next » Last » Search these comments
People seem to INSIST on using cloud storage, which removes your ability of privacy, so I'm going to write a strong encryption program using the NaCL librarary;
https://nacl.cr.yp.to/
The goal here is that the resulting encrypted data is impossible to recover without getting the original key. Keys are changed regularly, and being able to brute force one block will give the attacker no advantage in cracking the next block.
Also, it will be computationally expensive to attempt to crack even with specialized hardware. This increases energy consumption and slows down the encryption and decryption, but also will make brute force attacks 1000's of times slower.