Search results
Top results related to what is the purpose of software
Top Answer
Answered Aug 04, 2021 · 2 votes
There are many possible motivations why you may want to use an abstraction (such as the CSI driver or sidecar injector) over a native integration:
let secret;if (process.env.RAILS_ENV === 'production') { secret = secretmanager.access('...')} else { secret = 'abcd1234'}
- Portability - If you're multi-cloud or multi-target, you may have multiple secret management solutions. Or you might have a different secret manager target for local development versus production. Projecting secrets onto a virtual filesystem or into environment variables provides a "least common denominator" approach that decouples the application from its secrets management provider.
- Local development - Similar to the previous point on portability, it's common to have "fake" or fakeish data for local development. For local dev, secrets might all be fake and not need to connect to a real secret manager. Moving to an abstraction avoids error-prone spaghetti code like: let secret;if (process.env.RAILS_ENV === 'production') { secret = secretmanager.access('...')} else { secret = 'abcd1234'}
- De-risking - By avoiding a tight coupling, you can de-risk upstream API changes in an abstraction layer. This is conceptual similar to the benefits of microservices. As a platform team, you make a guarantee to your developers that their secret will live at process.env.FOO , and it doesn't matter how it gets there, so long as you continue to fulfill that API contract.
- Separate of duties - In some organizations, the platform team (k8s team) is separate from the security team, is separate from development teams. It might not be realistic for a developer to ever have direct access to a secret manager.
- Preserving identities - Depending on the implementation, it's possible that the actor which accesses the secret varies. Sometimes it's the k8s cluster, sometimes it's the individual pod. They both had trade-offs.
Why might you not want this abstraction? Well, it adds additional security concerns. Exposing secrets via environment variables or via the filesystem makes you subject to a generic series of supply chain attacks. Using a secret manager client library or API directly doesn't entirely prevent this, but it forces a more targeted attack (e.g. core dump) instead of a more generic path traversal or env-dump-to-pastebin attack.
1/5
Top Answer
Answered May 23, 2017 · 2 votes
My question is, what is the purpose of a license for such code?
The purpose of a license is that you have a document where it is written down which rights you grant with your copyrightable work (software can fall under copyright).
This helps users of your software to understand which rights they have with the software.
A Free Software License allows users to use, study, share and improve your software. This is the same for those Approved Licenses listed on the website of the Open Source Initiative.
So without a license you do not give many rights. A license clarifies which rights are granted. This is the first benefit for you: Users of your software don't need to ask you first.
Does it stop them from using it?
No, a license is not stopping from using it. At least normally not. A license grants the rights needed to make use of the software therefore its actually the opposite.
Or if they can still use it, does it (the license) benefit me in any way?
What do you mean by still use it? They can use the software if you provide a (known) software license. The benefit for you is that you tell so it's clear what you give.
If yes, in what ways?
For example by clarifying that you provide the software AS-IS without warranties of some kind. If you look into the licenses you find a passage about exactly that.
If I don't use any license for my source-code, is that a bad idea? To put it differently, would I regret in future if I don't use any license for my source-code which I release to the public?
Yes, this is generally a bad idea because you more or less do not tell your users which rights they've got with the software. That can have negative influence on usage patterns and contribution patterns. That's something you might regret in the future.
See as well:
- Can I use the code in a Github project which does not have a license specified?
This is a good book available online which goes through a lot of stuff step-by-step, for example Choosing a License and Applying It - The book is called Producing Open Source Software How to Run a Successful Free Software Project by Karl Fogel.
And this is one of the best essays that basically tells nearly everything: Make Your Open Source Software GPL-Compatible. Or Else. by David A. Wheeler Released 2002-05-06, revised 2013-01-18 - it has a lot of very good links as well.
2/5
Top Answer
Answered Sep 25, 2012 · 4 votes
Michael Krelin gave a very compact answer but I think I can expand on it a bit more.
In any language, not just C, you need to know the size for a variety of reasons:
- This determines the maximum value that can be stored
- The memory space an array of those values will take (1000 bytes will get you 250 ints or 125 longs).
- When you want to copy one array of values into another, you need to know how many bytes are used to allocate enough space.
- While you may dereference a pointer and get the value, you could dereference the pointer at a different portion of that value, but only if you know how many bytes it is composed of. You could get the high-value of an int by grabbing just the first two bytes, and the low value by getting the last two bytes.
- Different architectures may have different sizes for different variables, which would impact all the above points.
Edit:
Also, there are certainly reasons where you may need to know the number of bits that a given variables is made of. If you want 32 booleans, what not a better variable to use than a single int, which is made of 32 bits? Then you can use some constants to create pointers to each bit and now you have an "array" of booleans. These are usually called bit-fields (correct me if I am wrong). In programming, every detail can matter, just not all the time for every application. Just figured that might be an interesting thought exercise.
3/5
Top Answer
Answered Aug 06, 2021 · 3 votes
A label IS an address, it is a way for programmers to provide an address to the assembler but not have to know the physical address. Let the toolchain do that work for you.
I don't remember my MIPS off hand so here is some pseudo code.
loop_top: nop nop sub r0,1 cmp r0,0 bne loop_top
Depending on the instruction set, but in general the conditional branch will be pc-relative. Tables in general used during assembly with one or more passes on the table will resolve the distance between the branch and the destination so that the branch can be encoded completely. Most instruction sets the above can be resolved in one pass. loop_top is a label that will have an address, but for the branch here it is pc-relative and you don't need to know the physical address.
But
call my_fun-
once making a pass on the code, the assembler finds that my_fun is not defined in this file and/or the assembly language has some syntax to mark it as external before used. Either way it is external. Cannot be resolved at the time this file is assembled. So tables are required indicating the label name, and where in this object that instruction lives, depending on the assembler it may fill in the temporary offset or full address as zero for now or encode it as an infinite loop.
The linker later determines the actual address for things in the processors memory space, the linker will ultimately have a table of all (relevant labels at this phase of the toolchain) labels and their addresses while linking, then the linker will go back into the code and repair/create the machine code for this call instruction now that it knows what the actual address is for that label.
j hello-
the object:
Disassembly of section .text:-00000000 <.text>: 0: 08000000 j 0x0 4: 00000000 nop
another object:
.globl hellohello: j hello.word hello
link them
Disassembly of section .text:-00001000 <_ftext>: 1000: 08000402 j 1008 <hello> 1004: 00000000 nop00001008 <hello>: 1008: 08000402 j 1008 <hello> 100c: 00000000 nop 1010: 00001008 0x1008
As objects all the toolchain has to go on is the label hello being used as an address to be resolved later. In this case at link time, the linker works through the objects, counting bytes making a table of labels and their addresses. During the first or some other pass it will change the instructions or data as needed to resolve these labels.
Now old school assemblers that did the job of assembling and linking from the same source file, the statement "assembler must determine the addresses corresponding to all labels". It is not the assembler in general with commonly used toolchains that does the linker work. So that quoted statement could use some improvement. But hopefully this demonstrates that labels are addresses, they represent a yet to be determined address so the code is easier to write than something like this
nop nop j pc-2
then if you add another instruction
nop add r0,r1 nop j pc-3
Or
j 0x1008-
then have to spend a significant amount of time re-writing the program to get each and every address hard-coded into the program. Add/remove a single line and a lot of other code has to be changed. Labels representing addresses make that all significantly easier and the toolchain determines addresses, then goes back and replaces the labels with addresses basically...
Added a nop:
Disassembly of section .text:-00001000 <_ftext>: 1000: 08000403 j 100c <hello> 1004: 00000000 nop 1008: 00000000 nop0000100c <hello>: 100c: 08000403 j 100c <hello> 1010: 00000000 nop 1014: 0000100c
If we didn't have labels and had to hard-code the address instead then you would have to change those three places as a result of the nop. One line. If you added dozens of lines, hundreds. How would you keep track of it all? By putting labels in comments? Assemble and disassemble and patch up the source over and over again until it looked somewhat right and hope for no bugs.
mips-elf-readelf -s so.elf-Symbol table '.symtab' contains 14 entries: Num: Value Size Type Bind Vis Ndx Name 0: 00000000 0 NOTYPE LOCAL DEFAULT UND 1: 00001000 0 SECTION LOCAL DEFAULT 1 2: 00400000 0 SECTION LOCAL DEFAULT 2 3: 00400018 0 SECTION LOCAL DEFAULT 3 4: 00000000 0 SECTION LOCAL DEFAULT 4 5: 0000a010 0 NOTYPE LOCAL DEFAULT 2 _gp 6: 00002018 0 NOTYPE GLOBAL DEFAULT 4 _fdata 7: 0000100c 0 OBJECT GLOBAL DEFAULT 1 hello 8: 00001000 0 NOTYPE GLOBAL DEFAULT 1 _ftext 9: 00000000 0 NOTYPE GLOBAL DEFAULT UND _start 10: 00002018 0 NOTYPE GLOBAL DEFAULT 2 __bss_start 11: 00002018 0 NOTYPE GLOBAL DEFAULT 2 _edata 12: 00002018 0 NOTYPE GLOBAL DEFAULT 2 _end 13: 00002018 0 NOTYPE GLOBAL DEFAULT 2 _fbss
and here is the one of interest:
7: 0000100c 0 OBJECT GLOBAL DEFAULT 1 hello-
the label hello once assembled and linked into a final binary is equal to address 0x100C.
4/5
Also try
5/5
www.geeksforgeeks.org › software-and-its-typesWhat is Software? Definition, Types, Examples, and More -...
www.geeksforgeeks.org › software-and-its-typesAug 29, 2023 · Software is a collection of instructions, data, or computer programs that are used to run machines and carry out particular activities. It is the antithesis of hardware, which refers to a computer’s external components. A device’s running programs, scripts, and applications are collectively referred to as “software” in this context.
www.techtarget.com › searchapparchitecture › definitionWhat is Software? Definition, Types and Examples - TechTarget
www.techtarget.com › searchapparchitecture › definitionDefinition. software. By. Linda Rosencrance. Software is a set of instructions, data or programs used to operate computers and execute specific tasks. It is the opposite of hardware, which describes the physical aspects of a computer. Software is a generic term used to refer to applications, scripts and programs that run on a device.
www.britannica.com › technology › softwareSoftware | Definition, Types, & Facts | Britannica
www.britannica.com › technology › softwareApr 19, 2024 · Software, instructions that tell a computer what to do. Software comprises the entire set of programs, procedures, and routines associated with the operation of a computer system. The term was coined to differentiate these instructions from hardware—i.e., the physical components of a computer system.
www.webopedia.com › definitions › softwareWhat is Software? (Definition & Meaning) | Webopedia
www.webopedia.com › definitions › softwareApr 23, 2024 · Software is a set of instructions, data, or programs used to operate a computer and execute specific tasks. In simpler terms, it tells a computer how to function. It’s a generic term used to refer to applications, scripts, and programs that run on devices such as PCs, mobile phones, tablets, and other smart devices.
www.businessinsider.com › guides › techWhat Is Software? a Guide to All of the Different Types - ...
www.businessinsider.com › guides › techMar 26, 2021 · Software is a set of instructions, written in computer code, that tells a computer how to behave or how to perform a specific task. Software usually...
www.softwareadvice.com.au › blog › 2248What is software? A guide to its uses and types
www.softwareadvice.com.au › blog › 2248Mar 16, 2023 · Software is a set of programs containing data and instructions that perform operations and tasks, basically telling a computer how to work. Computers, smartphones, and tablets use software to perform or automate daily tasks.
www.explainthatstuff.com › softwareWhat is software? A simple introduction - Explain that Stuff
www.explainthatstuff.com › softwareDec 9, 2021 · What is software and why do we need it? Imagine if your computer could do only one thing. If all it could do were basic arithmetic, it would be, quite simply, a calculator. You couldn't send emails with it, write essays, play chess, or do anything else.
Searches related to what is the purpose of software