Golden Sun Hacking Community

The Community => Tech, Gaming and Entertainment => Topic started by: Luna_blade on December 04, 2016, 07:44:38 PM



Title: Programming rant
Post by: Luna_blade on December 04, 2016, 07:44:38 PM
So I have been studying Software Engineering for a few months now.
I have learned a lot, be it Java or assembly or general stuff.
Just a few days ago I watched this video:
https://www.youtube.com/watch?v=csyL9EC0S0c&t=3153s (https://www.youtube.com/watch?v=csyL9EC0S0c&t=3153s)

The guy isn't truly thinking bad about programming, it is more about the the whole community of programmers.
And programmers really are a kind of community. It is almost natural for a programmer to be active on some kind of forum or have some git/source lying around somewhere.
But there are so much strange things, like the guys says. "globals are bad" "don't use singletons" etc.
And I really don't mean conventions, of which we should have way more (I mean, how many C compilers are out there? And how many uncommon languages that are almost copies?).

There were some other topics he talked about like the macho-showoff culture (people scaring new programmers with assembly or bullshit complex code), which I see is pretty much a thing unfortunately.

One of my own bad experiences with programming lately is the StackOverflow community.
The idea of it is great, but the execution is horrible.
On one of the relative sites, cardgames+boardgames, I anwsered a single thing (which is impossible on SO as new member, but on CB it's not) and within a day I had almost all privileges.
One of my questions on SO hasn't got an anwser,, but I know the anwser now. But I can literally not anwser my own question until I have enough reputation.
I know the site has had it's troubles in the past and that maintaining something like that isn't easy, but still. You can't get through as a new member these days.

Another reason why I happily keep coming here, is that everyone is not very biased.

To conclude this little rant, I hope that I don't get biased and stop wanting to learn more about programming.


Title: Re: Programming rant
Post by: Lord Wolfram on December 04, 2016, 08:05:34 PM
Ah yes, I still remember back in a day people were saying to me that IDE's a re the worst thing created. It was like wtf the IDE makes the coding faster and better but they still insisted on that. I was confused and lost. (I was in small Linux community then, wanted to make a game in Linux)

One of reasons why I'd like to make an OS is so I can make it the way I see it should be, I mean Windows is fine but too restricted in some areas.
Linux distros are kinda bad for some parts of programming.

@ Community  Here we can make a great community, well I have my website and it has the content I'm making and I will always welcome someone else to help out and share some sweet stuff. A d**kless community is what we should have I think right?


Title: Re: Programming rant
Post by: Fox on December 04, 2016, 08:12:18 PM
@Globals are bad: Fine by me.
-Knowing the scope of a variable can help with figuring out how it is used.
-Locals/function variables are stored in the stack, so they're for the life of the function... where-as globals (if not used properly) take up unnecessary room for the life of the program.

But in the end, it is up to the person designing the program.  Just like any art.  So you can go either way. Typically, I like to avoid the use of variables altogether in situations where they are not needed. (There are exceptions though... like duplicated code, etc.) --- P.S. In the AoC topic, I did shorten the Part 1 code a bit more by swapping to dictionary... apparently, it is a one-liner. (The dictionary initialized right on the same line it is used.... and didn't even have to have a variable to assign the dictionary to.)

Quote
On one of the relative sites, cardgames+boardgames, I anwsered a single thing (which is impossible on SO as new member, but on CB it's not) and within a day I had almost all privileges.
Fun anti-bot system?

@rep: My guess is that most of the time, I think sites that do that only have good intentions... but those systems end up never being good to have. (Could be good for money-based trade, but I dunno.)


---
IDE's are awesome...
It's like the best thing since coding a machine to slice bread. (Trying to make a "best thing since sliced bread" joke.)


Title: Re: Programming rant
Post by: Luna_blade on December 04, 2016, 08:25:50 PM
@Globals are bad: Fine by me.
-Knowing the scope of a variable can help with figuring out how it is used.
-Locals/function variables are stored in the stack, so they're for the life of the function... where-as globals (if not used properly) take up unnecessary room for the life of the program.

But in the end, it is up to the person designing the program.  Just like any art.  So you can go either way. Typically, I like to avoid the use of variables altogether in situations where they are not needed. (There are exceptions though... like duplicated code, etc.) --- P.S. In the AoC topic, I did shorten the Part 1 code a bit more by swapping to dictionary... apparently, it is a one-liner. (The dictionary initialized right on the same line it is used.... and didn't even have to have a variable to assign the dictionary to.)
Yeah exactly. I do understand the point of memory trouble, but for most applications, RAM is at least 500MB (most mobile phones have 500MB) and higher on PC's. There should be nothing wrong with having a few global variables.
Quote from: Fox
Fun anti-bot system?
Yeah very funny.

Quote from: Fox
IDE's are awesome...
It's like the best thing since coding a machine to slice bread. (Trying to make a "best thing since sliced bread" joke.)
Having tried to work with devkitARM/PRO, almost or no IDE is literally horrible and I respect the people who made punchcards.

Quote from: Lord Wolfram
Ah yes, I still remember back in a day people were saying to me that IDE's a re the worst thing created. It was like wtf the IDE makes the coding faster and better but they still insisted on that. I was confused and lost. (I was in small Linux community then, wanted to make a game in Linux)
Exactly what I meant with the bad part of the programming community.
Quote from: Lord Wolfram
One of reasons why I'd like to make an OS is so I can make it the way I see it should be, I mean Windows is fine but too restricted in some areas.
Linux distros are kinda bad for some parts of programming.
Really? I always thought linux is great for programming and was very customizable.
And yeah, OS's are getting very limited in custom styles.
It is sorta understandable from a design perspective and it works for all the test groups...
But leaving customization open is so easy and the current UI design seems more to build an image for a company then to be usefull.

I have to get a Linux certificate later this year.


Title: Re: Programming rant
Post by: Fox on December 04, 2016, 08:39:19 PM
Oh, there's nothing "wrong" with it... I'm just listing out possible optimization concerns. (A lot of times, we get stuck wasting our time on micro-optimizations... Ram-usage is more and more a micro-optimization in this day and age.... unless of-course, you get a really bad memory leak.)
I think instead of saying "Globals are bad"... I think it'd be much better had they said "Obsessive globals are not recommended"....(See how I swapped bad for "not recommended"? PROBABLY means the same by their definition, but who knows. I think it is best to be specific, though.) (Implying more of a percent of space used, rather than a constant number of them.)

A custom OS that is basically Linux+Windows+Mac would be neat... even having all the settings in the same familiar places.


Title: Re: Programming rant
Post by: Luna_blade on December 05, 2016, 07:52:49 AM
... even having all the settings in the same familiar places.
Especially this.
I just wrote something about how software/OS needs lot's of options and settings, there is no use in having them if they are very hard to reach.
It is something I think Android does wrong in my opinion. Most of the time you can't be sure whether something is an option (and sometimes only configurable when rooted) or not.


Title: Re: Programming rant
Post by: roger on December 05, 2016, 04:16:33 PM
I can't watch the video right now, maybe after work.

My two cents - when people say things like "don't use x", they're following a standard that, in their minds, will help protect them from causing problems down the line. However, what I notice a lot of programmers DON'T do is they don't try to dig down and understand why they're doing what they're doing. If you understand why you're doing what you're doing, you understand why globals aren't a good idea most of the time, but are useful for certain applications (which is why they're there in the first place). Same goes for other things.

Remember that programming, like any other form of engineering, is about designing something towards a specific end goal. There are most certainly "right" and "wrong" ways to go about this - going for a method that's highly unoptimized and causes frame rate drops is clearly the "wrong" way to do it. So establish a set of absolute requirements, and orient your design in that direction.

Also, don't forget that a lot of programmers are pretty damn haughty and lazy lol. a lot just don't like change.


Title: Re: Programming rant
Post by: Fox on December 05, 2016, 04:27:08 PM
Those are some good points.

Quote
going for a method that's highly unoptimized and causes frame rate drops is clearly the "wrong" way to do it.
Under the assumption that most people /should/ /want/ to have optimized code with a fast frame rate, then yeah...
However, if you were to say... use it for educational purposes of what not to do.. Then it could be the "right way" to show an example of "what we shouldn't be doing for the people who use this program." ... It all depends on context, and usually the context is to not annoy people. Bugs and slow frame rate annoy people. So anything that annoys people would be labeled as "wrong way"... unless your purpose is to actually annoy people? Which would be mean. (Morally wrong.)


Title: Re: Programming rant
Post by: roger on December 05, 2016, 04:32:00 PM
Well, that's my point in saying that it's engineering. If you want to engineer it towards being poorly optimized, having memory leaks ect. as a proof of concept, then achieving those design goals would obviously be the desired result in those cases. Again, you're engineering towards your system to have certain properties; in most cases though these sorts of "design choices" would be pretty bad.

For example, if you build an application that is intended to crash itself when you push a button, this is fine. But if you build an application that crashes when you push a button and that's NOT the intended effect, it's poorly engineered.


Title: Re: Programming rant
Post by: Fox on December 05, 2016, 04:44:06 PM
Yeah....
@Crashing: Makes sense.
I can imagine something like that being in a virus...
But I can also imagine it maybe being in a shareware program.
For example... When a trial ends, a whole set of disadvantages could arise... they could do any number of things to try to get you to pay for the application, so I imagine in that event, some people may really look into doing something similar to those "bad design choices"/or anything similar.? Usually the program just stops working/serving its purpose, though....


A virus is morally wrong regardless of intent... but the trial one.... is a gray area. (Depending on what they do.) - I'm thinking most of the time, you can still get by the "trial limit" if you know what you're doing. (Most people don't.) (I still need to look into that myself... Since I can never seem to fully get into Intel assembly hacking... I mean, sure, I know some code... but haven't figured my way around, that's the main problem. - Interested more as a hobby to learn what people do with their apps... rather than actually screwing devs.)


So... here comes a question...

We know that when using a ROM on an emulator (VBA)... the worst possible thing that could happen from editing ROMs randomly is that VBA would get error messages and possibly close....(?) nothing dangerous, right? (Usually you get crashing/freezing, though.)
So... what's the worst thing that can happen with apps from just randomly editing them? (A simple application crash? ... Just thinking about memory leaks already has potential to give me shivers down my spine. :P) Or could it potentially knock out your computer? And/or cause you to lose your files...  I mean, it would be nice to make sure-sure, since who knows how Windows OS actually works.... they might have some protection system in play (Like relying on Kernel, somehow.), but I dunno how that works, yet.
^ Saying because randomly editing was one of the ways I started learning to hack the GBA.... (in the early days.)


Title: Re: Programming rant
Post by: roger on December 05, 2016, 05:58:26 PM
Typically, crashing software is not really optimal since it disrupts the end user; even for viruses this is not really desirable behaviour. I think it would make far more sense to just "lock" certain parts of an application after a trial has gone through, especially considering many trial software programs allow you to still open files after your trial period.

Viruses aren't inherently morally wrong. Viruses are merely an application that replicates itself. The original viruses were created as proofs of concept, and some are created as a joke or a gimmick. Viruses that have an intent to damage a system could be considered "morally wrong" in many circumstances but at the same time, a destructive payload could be used as a weapon of war that will likely not cause any casualties.

Going back to DRM, it depends on what system the application uses in order to get around it. For example, some software has a pretty obvious leak that may allow circumnavigation to require little work at all - old versions of Mixcraft software for example had this problem, where you could circumvent the DRM through making new user accounts. Most require some level of reverse engineering in order to find the best solution - software "cracks" are designed to use this information to bypass this DRM. Doesn't fix DRM associated with checking with an online server though...

There are a few major differences between GBA ROMs and Apps:

1. GBA roms don't run on an operating system - the entire cartridge holds an application that can be run directly from the rom without any operating system interface. This means that global settings, such as whether or not you're connected to the internet, are not stored outside of the cartridge itself.
2. Speaking of that, GBA has no way to access a network without building some sort of peripheral. This means that if you were to store private data on a GBA... for some reason... it would be less likely to be captured by identity thieves. At the same token though, the benefits of being able to connect to a network outweight the risks, so they're usually used on mobile devices today.
3. I don't know much about iPhone apps, but most android apps are developed in Java, which does not allow the developer to handle memory directly. Contrast this to a GBA rom where you'll often be accessing memory addresses directly. Memory management is handled by the virtual machine and to an extent the operating system itself. Because of this, it's likely that randomly meddling with a java compiled file will just result in it not working, unless you specifically inject something that actually makes sense to the virtual machine.

Basically, changing random bytes won't really do anything but probably make the program crash, unless you somehow manage to inject something that does something different entirely. If this was C, things would be different, but alas. Also, your concerns with apps shouldn't be whether or not they crash but whether your information is secure, since this is the primary goal of malicious software these days (to extract information so that your money or identity is stolen). This of course depends on the language of the application; some android apps use C++ or lower languages so you might have more memory handling issues there. Usually, if there's a memory exploit in a java application, its usually because of a memory exploit in the interpreted environment rather than just something the developer has done (although that doesn't eliminate the possibility).

It is possible to reverse engineer the application, however, that's not really "randomly changing bytes to see different effects", but to rather write out the application, usually in something like assembly, to see what the application is doing on a very basic level, and then abstracting that model to try to get a class model for the application. I've never done that before because I have a life that doesn't involve computer security :p


Title: Re: Programming rant
Post by: Fox on December 05, 2016, 07:18:33 PM
Quote
Viruses that have an intent to damage a system could be considered "morally wrong"
That's what I meant... (Really didn't think too much about my word choices. :/)

@GBA: Well obviously, the GBA is a very simple console/handheld... There is no hard drive space to save data on it, so there isn't anything to be afraid of when it comes to loss of data. Etc. Where-as, something like the 3DS, where you "install" stuff... who knows. I'm thinking the I/O stuff is used, though... so it'd be pretty difficult to accidentally mess with them. (Unless there is code that is already messing with them and you managed to edit the wrong bytes?)

I was mainly concerned more with the chance of bricking the comp in some possible way, rather than the possibility of identity theft though. (But that's important as well.)

@Apps: I mainly referring to Windows applications, and not mobile ones... but I'm sure both could count.

Yes, I know that reverse engineering is best when you do not randomly change the bytes... (To me, the main purpose of randomly editing them is to see if when the code is being executed without really using a breakpoint debugger...Etc. -- The point is for the possibility of doing that in the learning process... rather than any formal approach.


Title: Re: Programming rant
Post by: roger on December 05, 2016, 07:39:01 PM
You can't really brick a computer from a single application unless it rewrites some sort of information required for helping it boot (or some other critical system function).

Bricking wiis were pretty common back in the wii homebrew era. For example, you could brick your wii by loading an application with an improperly designed banner - because the Wii has no error handling for this it causes the device to crash on boot. You would have to fix the bad entry some way or another, either by deleting the app or replacing the broken file. You could also corrupt the IOS and cause a brick that way too. All these things are related to some function that happens before the console is loaded to the point where the player interacts with it (beyond the safety warning screen of course). If the system hangs for any reason before that point, it's considered a brick in some form or another. You can also "semi brick" systems by bricking some of the functionality through corrupt data.

A windows application isn't really much different from an application on a phone or other device with an underlying operating system. The operating system basically allows it to function in its own space, while the operating system gives the application the tools it needs to do things like read/write or communicate with drivers. Again, you can't brick stuff unless you overwrite critical boot data.

Of course, because operating systems are more customizable than something like a wii, errors like that associated with the banners wouldn't occur since a production release would probably not have such a bug (and if it was located would be fixed very quickly)


Title: Re: Programming rant
Post by: Fox on December 05, 2016, 07:53:17 PM
Quote
Again, you can't brick stuff unless you overwrite critical boot data.
Yes, that. I don't know all the files that we should be careful with. (Is there a list?) And if an app used one of them, and somehow had write-access....? Hm... (Assuming you're modding a program that has admin access because you're not sure of any workarounds.)

I know that there are some files in System32 that may be necessary... but I never figured out which ones... Etc.

I think all drivers are loaded on boot at some point...  so that could be one. (Input devices.)



Title: Re: Programming rant
Post by: Luna_blade on December 05, 2016, 09:22:43 PM
Quote from: Seto Kaiba
My two cents - when people say things like "don't use x", they're following a standard that, in their minds, will help protect them from causing problems down the line. However, what I notice a lot of programmers DON'T do is they don't try to dig down and understand why they're doing what they're doing. If you understand why you're doing what you're doing, you understand why globals aren't a good idea most of the time, but are useful for certain applications (which is why they're there in the first place). Same goes for other things.
Yeah not going deeper can really be a problem. Especially if you work with other people code.
I also notice that I really don't take the time to understand everything of javaFX...
Quote from: Seto Kaiba
Remember that programming, like any other form of engineering, is about designing something towards a specific end goal. There are most certainly "right" and "wrong" ways to go about this - going for a method that's highly unoptimized and causes frame rate drops is clearly the "wrong" way to do it. So establish a set of absolute requirements, and orient your design in that direction.
That is a great way of putting it.
Quote from: Seto Kaiba
Also, don't forget that a lot of programmers are pretty damn haughty and lazy lol. a lot just don't like change.
I hope they like changing variables then.
So... here comes a question...

We know that when using a ROM on an emulator (VBA)... the worst possible thing that could happen from editing ROMs randomly is that VBA would get error messages and possibly close....(?) nothing dangerous, right? (Usually you get crashing/freezing, though.)
So... what's the worst thing that can happen with apps from just randomly editing them? (A simple application crash? ... Just thinking about memory leaks already has potential to give me shivers down my spine. :P) Or could it potentially knock out your computer? And/or cause you to lose your files...  I mean, it would be nice to make sure-sure, since who knows how Windows OS actually works.... they might have some protection system in play (Like relying on Kernel, somehow.), but I dunno how that works, yet.
^ Saying because randomly editing was one of the ways I started learning to hack the GBA.... (in the early days.)
If you would change random bytes it is important to note what language the program is written in.
But I guess usually your computer would come out unscathed. The chances of hitting something important is small (when you look at all x86_64 instruction, the chances of chaging it to a problem... or all possible path combinations...).

Memory leaks could be easy to trigger I guess? But that wouldn't harm your pc that much as well.


Title: Re: Programming rant
Post by: Fox on December 06, 2016, 01:12:17 AM
Lazy programmer shouldn't be that ironic, really... Get to lay down in your bed all day (At least figuratively), watch t.v., get fat, eat tons of sugar and have diabetes ... all that fun stuff...
--
Quote
The chances of hitting something important is small
I agree with that likeliness... but wasn't sure if there was anything I was missing...

The worst case scenario I can imagine being the most likely, is if you're trying to hack a program with violent anti-hack features. :/ (However, the chance of a program being created as such is pretty tiny.)

I remember once messing something up because I cleaned out the registry... via using a program to do so... ...  it's been so long now, though... (Maybe even a decade?? ... (I think it was the empty keys?) But note, I forget exactly all the details, but anyway.)  So you also have to use common sense as well.

Stack Smash


Title: Re: Programming rant
Post by: roger on December 06, 2016, 01:43:00 PM
Windows Registry is just a database with settings for your operating system. It can cause issues if you were to clear it out since many pieces of software rely on the registry for things like software expiration and even critical system processes. In rom hacking terms, it would be like deleting a table used to lookup sprites or battle scripts.

By the time you're screwing around with the stack, you're more than likely not doing "random bytes" anyways; either you just crash the program with a number of stack-related crashes or you trigger arbitrary code that doesn't do anything or potentially crashes the computer.

Anyways, developer laziness is one of the key problems facing accessibility today. Most software is not made accessible because most people don't know what's required and they don't fill in all the accessibility labels, let alone try to build a logical focus order.


Title: Re: Programming rant
Post by: Luna_blade on December 06, 2016, 02:21:34 PM
Anyways, developer laziness is one of the key problems facing accessibility today. Most software is not made accessible because most people don't know what's required and they don't fill in all the accessibility labels, let alone try to build a logical focus order.
https://www.joelonsoftware.com/2003/10/08/the-absolute-minimum-every-software-developer-absolutely-positively-must-know-about-unicode-and-character-sets-no-excuses/ (https://www.joelonsoftware.com/2003/10/08/the-absolute-minimum-every-software-developer-absolutely-positively-must-know-about-unicode-and-character-sets-no-excuses/)
Does that include translation?
I know windows supports lot's of languages. But Android IDK?
http://stackoverflow.com/questions/7973023/what-is-the-list-of-supported-languages-locales-on-android (http://stackoverflow.com/questions/7973023/what-is-the-list-of-supported-languages-locales-on-android)
Quite a lot, but likely not in the earlier versions.



Title: Re: Programming rant
Post by: Fox on December 06, 2016, 02:25:09 PM
-I know what the registry is... and you are correct. In fact, I believe the files for them are in... System32 /config...
I think I'd like to think of it as some sort of SQL-like thing.. (But not really.) Since SQL happens to be about managing tables as well. (But SQL is more of a coding type of thing. SQL = Structured Query Language)

@cleaned out = I don't mean deleting the whole thing, no... Just things that fell into a specific category at the time... apparently the program I was using wasn't clear about the dangers. Maybe I wasn't thinking? -- But it was so long ago, so do not think of it as anything recent.

-Well... I more just thinking of worst-case scenarios.... (Which I would think, requires knowing what all the boot files are... etc.) ... I mean... I could go on to say the registry is a type of "app" (In some way")... some people say to be careful in the registry...  and now maybe I want to know what files/keys to not touch... it's basically the same premise of what I'm trying to say. (In a somewhat(?) different form.) Since the more specific the information, the better.

Perhaps it can be made (Assuming you're designing an OS) so that the Kernel (and maybe a specialized back-up sector) is the only thing you need to actually be careful of, but I dunno... (Since that way, we could have several different forms of admin access.. The top owner status could have Kernel access, while regular admins don't, but has access to everything else... including boot files that could be repaired by Kernel. (Assuming you allocate that feature to the Kernel, in this example.))

-That's understandable... It already takes a lot of crazy time to build a game... so I'd admire those who are able to do frequent updates to whatever software they're developing. (Even if the updates are relatively small.)


Title: Re: Programming rant
Post by: roger on December 06, 2016, 03:23:56 PM
Anyways, developer laziness is one of the key problems facing accessibility today. Most software is not made accessible because most people don't know what's required and they don't fill in all the accessibility labels, let alone try to build a logical focus order.
https://www.joelonsoftware.com/2003/10/08/the-absolute-minimum-every-software-developer-absolutely-positively-must-know-about-unicode-and-character-sets-no-excuses/ (https://www.joelonsoftware.com/2003/10/08/the-absolute-minimum-every-software-developer-absolutely-positively-must-know-about-unicode-and-character-sets-no-excuses/)
Does that include translation?
I know windows supports lot's of languages. But Android IDK?
http://stackoverflow.com/questions/7973023/what-is-the-list-of-supported-languages-locales-on-android (http://stackoverflow.com/questions/7973023/what-is-the-list-of-supported-languages-locales-on-android)
Quite a lot, but likely not in the earlier versions.



I'm referring to blind accessibility, but that's another example of laziness. What usually happens with a developer is that they assume that since it works for them under certain circumstances that it works for everyone. In the case of blind accessibility, that problem is pretty obvious since blind accessibility requires that you 1) set up an appropriate focus order of your elements, so that a blind person can navigate via tabbing/keyboard, and 2) requires labels so that blind people can tell more about an object than "Radiobutton, radiobutton, button, frame) ect. Poorly made websites oftentimes will have you tabbing through a long list of "table/row/column" before reaching any substantial text. Many developers don't even realize they're forgetting it. Those who do know how time consuming it can be, especially to fix it.

What you're talking about more has to do with character sets which is another problem entirely rooted in the same psychological idea - "it works for me so it will work for everyone". Smaller character sets have limited space for characters and therefore other alphabets such as cryllic or greek either are installed on larger character sets, or replace latin ones, which in the latter case often causes display issues. I'm no expert on character sets but I do know that at least.

@ Fox - Restoring the registry is fairly easy though, as long as you're able to, in some way, access the file system. For example, if you managed to bork your system so badly that it can't boot, but just need to replace the registry, if you have a backup file that you can use, you could boot using an alternative boot method (for example, using a disk to boot with Ubuntu or something) and replace the file that way. On systems like a Wii or other closed software systems this is much harder to do, but on something like your PC you should be fine. Hell, once I completely destroyed my windows Vista through some crazy overflow that somehow corrupt some system files; I was able to get all my data backed up through running an ubuntu DVD and just loading them on my portable hard drive, then reimaged the hardware. Was down for a good 2 days though.


Title: Re: Programming rant
Post by: Fox on December 06, 2016, 03:51:39 PM
Hm... Good point. Which files are required to access the file system? (Besides the Kernel, since we know it comes first.)
And how long does that take to replace? (As part of the worst-case scenario statistic.)
I am not sure about boot methods... assuming you don't have a disk (Esp. not a built-in CD drive this time... Thumb drives could probably work... since all computers typically have USB,, and they're pretty small/easily portable...).... I suppose you could dual boot with an iso file, but I haven't really set them up. (There is a screen for dual booting though... but the other option (I was going to have it be a Linux/Ubuntu since like... a long time ago), basically is messed up/whatever word goes here.)

@Your experience with overflow:  And that's nice to know. (Although sad to see happen to someone.) Thanks for sharing.


---
I think it's interesting how we went off-topic (assuming the topic is about the programming community's way of doing things.), and how it's still related in some... really strange way.


Title: Re: Programming rant
Post by: roger on December 06, 2016, 04:23:50 PM
It really depends on what system you're using and I don't know a ton about it, especially on PCs. However, this is the very basic jist of how bootstrapping works:

When you boot a computer (or any device), electricity is powered to the device, and there is a point in memory that basically defines the first memory address to be read. The bootstrap code is designed so that it allows access to more and more memory and devices. Once memory has been allocated the code starts setting up the framework for the filesystem and operating system.

Any device that can be connected to the computer and is able to be booted through the computer's boot sequence could be used. When you boot a computer, there's an option to select your "boot order", or the order of devices being read. On older computers, it was well known to remove a floppy from your computer before booting since it would be hard coded to read from the A drive first before the C drive (namely because hard drives were not always a thing on these older computers!). In fact, some viruses propogated in this manner in the old days by basically running code that runs on boot from the floppy, and give it the illusion of not being a bootable device.

You could use a bootable thumb drive, removable hard drive, DVD, ect. but the volume would probably have to be labeled as bootable when you set up the partition. Again not an expert but this is what I know.

What this means is that as long as whatever software you're running is able to initialize themselves in this way, they can be used to boot a computer.