Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Erik Sieghart

  • Content Count

  • Joined

  • Last visited


This user doesn't have any awards


About Erik Sieghart

  • Title

Profile Information

  • Gender
  • Location
  • Interests
    I like things that are hard to do, but also things like video games.
  • Biography
  • Occupation
    Software Engineer


  • CPU
    i5 6600K
  • Motherboard
    EVGA Z170 Stinger
  • RAM
    16 GB Corsair Vengeance LPX
  • GPU
    GeForce GTX 1070 Reference
  • Case
    Corsair Graphite 600T
  • Storage
    256 GB Samsung 850 Pro / 1 TB Seagate HDD
  • PSU
    Seasonic 650W
  • Display(s)
    Nixeus 1080p 144Hz
  • Cooling
    Corsair H110i Closed Loop
  • Keyboard
    Razer Blackwidow Chroma
  • Mouse
    Razer Mamba Tournament Edition
  • Sound
    M-Audio 2x2 / Shure SM58 / AKG K240
  • Operating System
    Windows 10 / Ubuntu

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Erik Sieghart

    C++ or C#

    Well that's what people think anyway. You should read some of the old Joel on Software articles.
  2. Erik Sieghart

    C++ or C#

    This kind of game design should only ever be C++. You're not going to get the performance you need anywhere else. Also a note about bloat: that's a term people use but it just means feature rich. It's not a negative to have a lot of options.
  3. Okay well there's no programming advice I can give you.
  4. I agree that C# is a good recommendation. It's my favorite language, personally.
  5. And: Deluge Doki Doki Literature Club Dropbox Eve Online Reddit The Sims 4 Not to mention the countless websites currently being held up by django. To put this in perspective there are at the time of writing this according to Stack Overflow jobs: Ruby on Rails - 203 job postings Spring - 156 job postings Django - 131 job postings ASP.NET - 83 job postings Laravel - 31 job postings The fact python is competing on even footing with languages like Java and C# in the web world, proves that once again, people's misconceptions about it are wrong. It's slow, it's bad, it's not a real language is all I ever hear. Yet it's continually the language of choice in many areas due to its easy of deployment, intuitive use, and relative simplicity. You can bundle an entire python program all up in a nice little box and ship it on its way, maybe into a Docker and have a quick little script doing exactly what you want in less than an hour. It's got numpy, pandas, sqlalchemy, django, tesseract, etc. Most major companies have libraries built in python for their APIs. It has very mature and robust libraries available to develop whatever you wish. The idea that python is a kiddie script language is the idea of academics. For some reason people equate it to the like of Prolog. --- So why not write perfect code in C? Because while theoretically you could write write a program that is elegant, efficient, and masterful in C, it doesn't mean you're going to be able to write something that's large scale successful. Python is cheap to write and you might think that's bad but in reality in the world of engineering we don't care about doing things so we can get an A and a gold star, we do things that work. Why would I waste extra time coding something in C that I could write in python much faster, with fewer lines, that's easier to understand? When really all it's doing is parsing some small CSV file into a database with some correct formatting or scraping statistics for a report. You know what C and C++ has? Memory management, pointers, the ability to get in trouble much easier. Well, you may say, "Modern day C++ has these other things that..." And yeah I don't really care (for the record I have written in these languages). I don't want to write boiler plate code, and you shouldn't either. I don't have time for it. If that's your schtick do what makes you happy. But you know how big applications are created and maintained? By lots of developers. Developers of different skill levels. I'm not really going to argue about it anymore because one of the junior devs probably broke the build again so there goes another two hours of my time.
  6. Your first mistake is trusting this guy twice. You should just cut off all contact with him.
  7. You can't control what files do, they're just data. There's a lot of OS checks in place to prevent what you described because would be malicious software.
  8. People keep saying that it's locked into windows but it's untrue. I've been running a website from my macbook in a linux docker container for awhile now.
  9. This is accomplished under the hood by making a call to the OS. You can write it yourself with a "how do I get cpu info from terminal" and "how do I execute terminal commands from Java".
  10. Oh... How very naive. I'm not sure what you based that on but C# is nearly as popular as C++.
  11. You don't. I'm not kidding your question is like how do I get to the moon without rockets.
  12. If you're that intent on spending your college days doing something you'll be doing for the next few decades then... I know CS programs like to split up things by "Web, Embedded, Cloud" etc as overly broad categories but these are, in general, not what you're going to see in advertisements. I'll give you the general scope of why by breaking it down: Embedded: This could be literally anything and expect to be working in a language like C (if you're lucky) on some kind of software that's going to be put into a 256k memory module installed on a circuit board. It could be medical equipment or toys of some kind. Personally not my cup of tea since it's possible you're working on something that could seriously hurt someone (such as fork lift controller firmware) if you screw it up. Desktop: This is what I do for a living (mostly). I write a desktop CRM application custom for my business. I guess it could be fun but more often than not it's going to be some kind of business software. The languages used are pretty vast. C++, Java, and C# are some big players. Mobile: It's just like desktop but with different languages, sorta. You could be using Swift, C#, Java, or C++. Don't expect a lot of people to be using C++, though. Cloud: A deceptive name for what should really be called "Backend Services". You don't program the software that runs the cloud unless you're really into that sort of thing and get lucky finding a job doing it (or contribute to one of the open source projects). You develop APIs and such that get put up in a cloud like system. Web servers are often done this way too. Backend stuff could be anything though, like image processing, web scraping, or file management. Web: You're going to be a full stack dev. That means you can build a website from scratch all by yourself. You won't be, but that's what they want. --- Now then... These categories are meaningless because employers care about technologies and not languages. And the technologies may or may not be tied to the language. A company may want django (python) for their web development with experience in Redis and Docker. Or they may want ASP.NET (C#) skills. WPF skills (C#). Maybe they have a Qt (C++ in my example case) with a SQLite backend. Or they could have an Electron app (JavaScript.. Kinda...) if they're very daring. If you're confused that's about right. They may want you to have bash or PowerShell scripting experience. Or they could want you to have linux kernel understanding. It's better to come up with an idea of "I have a cool idea for this thing" that you can build yourself. That way it's probably going to be useful to you and fun to build. Like one of my things was, "I want to make a program to automatically upload my computer's specs into my LTT profile page." This idea fell apart for me when I realized obtaining some hardware information from Windows was actually extremely difficult, but you get the idea. At least I had fun trying to do it.
  13. If you don't know the answer to that question the answer is emphatically no: the care has a lot of power and precision behind it. I don't think it's your kind of "open up and modify in my garage" kind of car. You would have to custom design a transmission to be put in place in the car, not to mention the space constraints. While technically possible to design such a thing, is probably well beyond the scope of even a seasoned mechanic's and engineer's abilities.
  14. I checked out one: it looks like it was all in the javascript but it was compressed for deployment so it's not very readable. At the heart of it, the YT video is passed frame by frame to your computer to play on the screen. Any program which captures it is using this to convert the file. I'm not sure how difficult YT makes it to download their videos, but probably not the easiest thing in the world.
  15. Here is the program that does what you want, written in python since I don't know PHP but it should be relatively easy to convert. import copy, math from decimal import Decimal D = Decimal # For an individual line item. class Item: name = '' qty = 0 cost = 0 subTotal = 0 def __init__(self, name, qty, cost): self.name = name self.qty = qty self.setCost(cost) def setCost(self, newCost): self.cost = newCost self.subTotal = self.cost * self.qty # Generic data for an invoice. class Invoice: amountDue = 0 paymentTotal = 0 total = 0 items = [] def recalculateSubTotals(self): remainder = 0 # Determine the base cost. This is basically a more efficient way of doing this. for item in self.items: # The coefficient is basically the percentage of the total the item makes up. coefficient = item.subTotal / self.total # This is now the estimated new subTotal of the item. calculatedSubTotal = coefficient * invoice.amountDue # Now generate the base of the new item's subtotal, rounded down. # // is floor division. item.setCost(math.floor(calculatedSubTotal * D('100') // item.qty) / D('100')) # Add to the remainder amount the difference of the calculated and floored value. remainder += calculatedSubTotal - item.subTotal # Most expensive items first since they would take the remainder by weight. self.items.sort(key=lambda item: item.subTotal, reverse=True) # Now we need to distribute cents left over in the remainder. foundItem = True while foundItem and remainder >= D('0.01'): # Wait until we find an item that we can deduct from the remainder. foundItem = False for item in invoice.items: # Only if the minimum amount we can add to an item can be successfully subtracted from the remaining value. lowestIncrease = D('0.01') * item.qty if remainder - lowestIncrease >= 0: item.setCost(item.cost + D('0.01')) remainder -= lowestIncrease foundItem = True # Return the remainder since it may not have all been added to the items. return remainder invoice = Invoice() invoice.items = [Item("Apple", 1, D('1.49')), Item("Orange", 2, D('0.99')), Item("Banana", 5, D('0.47'))] invoice.total = sum(item.subTotal for item in invoice.items) # Enter payment here. invoice.paymentTotal = D('3.49') invoice.amountDue = invoice.total - invoice.paymentTotal original_invoice = copy.deepcopy(invoice) original_invoice.items.sort(key=lambda item: item.subTotal, reverse=True) # Recalculate invoice totals. remainder = invoice.recalculateSubTotals() for i in range(len(invoice.items)): old_item = original_invoice.items[i] item = invoice.items[i] print("Item: {0}, Original Amt: ${1}, New Amt: ${2}".format(item.name, old_item.subTotal, item.subTotal)) print("Total: ${}".format(original_invoice.total)) print("Paid: -${}".format(original_invoice.paymentTotal)) print("Amount Due: ${}".format(original_invoice.amountDue)) print("New SubTotal Sum: ${}".format(sum(item.subTotal for item in invoice.items))) if remainder > 0.01: print("Remainder: ${}".format(remainder)) As others have stated, use a decimal or money type for all literals so that rounding errors are not present.