These are chat archives for bangorunix/2015

31st
Mar 2015
GeorgeKouk
@GeorgeKouk
Mar 31 2015 12:51
I'm a bit confused about task 8, "Use the tool to generate a project scaffold for itself and fill in the README.txt file appropriately."
Do you want us to move the script and the README or just the README to the newly generated scaffold?
Dan Prince
@danprince
Mar 31 2015 12:54
Move both over.
GeorgeKouk
@GeorgeKouk
Mar 31 2015 12:54
Ok thanks!
Dan Prince
@danprince
Mar 31 2015 12:55
No worries!
GeorgeKouk
@GeorgeKouk
Mar 31 2015 13:01
I just deleted the hole freaking folder with my script and all :worried: , any way to recover the file?
Dan Prince
@danprince
Mar 31 2015 13:03
Afraid not, when we introduced rm, we let everyone know that it was permanent.
GeorgeKouk
@GeorgeKouk
Mar 31 2015 13:04
dammit :( back to square 1 now
Dan Prince
@danprince
Mar 31 2015 13:05
There's a way to alias it to act like a recycle bin instead, if you google for it, there are a bunch of guides as to how to do it
GeorgeKouk
@GeorgeKouk
Mar 31 2015 13:06
I will google it, thanks.
Noah
@eeue56
Mar 31 2015 13:29
How much work have you lost?
GeorgeKouk
@GeorgeKouk
Mar 31 2015 13:32
I had done everything but the last part
Noah
@eeue56
Mar 31 2015 13:57
Was it on our server?
GeorgeKouk
@GeorgeKouk
Mar 31 2015 13:59
yes, don't worry about it thought, I've almost finished it.. again...
*it was on my server, not yours'
Noah
@eeue56
Mar 31 2015 14:01
There's a software development methodology called rapid prototyping, which follows the belief that you should develop an application in phases. In each phase, you build a minimal viable product which fulfils a set of criteria from scratch.
So the first phase might deal with feature {x}, the second phase might be {x, y}
The idea is that you generate a series of products, each achieving some goal set that needs to be done, but you don't get burdened by legacy code, so there is continuous improvement.
The code you get at the end is cleaner than if you followed other practices
So, consider it your first step towards adopting rapid prototyping
GeorgeKouk
@GeorgeKouk
Mar 31 2015 14:05
isn't that what we do in most labs/assignments? We are given certain tasks and complete them one by one, is this what you mean?
Noah
@eeue56
Mar 31 2015 14:06
Not quite.
So, let a = feature set {x}, let b = feature set {x, y}
You build a product for "a", which provides all the features in the set ("x")
For "b", you write another product which provides all the features in the set ("x" and "y")
That is to say, you don't add feature "y" to product "a".
Instead, you write a separate product "b" (the concept of throwing away all your code for "a", and not reusing it)
The idea is that the knowledge of the implementation of "a" transfers to "b", while being able to consider it from a fresh perspective without needing to rely on the code for "a".
GeorgeKouk
@GeorgeKouk
Mar 31 2015 14:15
Oh I see, but isn't that bad for consistency? Code b for example might not work without code a and might be hard to combine with a to get the final product. But I get the "knowledge transfer & having a fresh perspective thing"
Noah
@eeue56
Mar 31 2015 14:18
You don't combine the codebases
The codebases are kept separate, though you can migrate things out into a library that can be used by both codebases
So when you start on product "b", you don't use any of product "a" other than the knowledge of how to implement the featureset ({x})
This is diverged quite a bit and could go on for a while haha
GeorgeKouk
@GeorgeKouk
Mar 31 2015 14:22
hahaha yeah, I understand what you mean now, me deleting my script is like throwing away code a, and rewriting the script is like writing code b, the knowledge of writing the script the first time will make coding the script again easier and will probably end up being better than the first version. ;)
Noah
@eeue56
Mar 31 2015 14:25
Exactly! But also adding the feature {y} (parts of the assignment you hadn't done already) And the code will be done in a better way, as you can implement it with a better understanding of the system as a whole.
agwhitaker93
@agwhitaker93
Mar 31 2015 15:48
I'm having trouble with example 2. I've got as far as making the script create a $name file with the example in it, but I can't get it to actually work once it's made
Dan Prince
@danprince
Mar 31 2015 15:49
Can you clarify what you mean by 'work'? You can't get it to execute? Or it has errors?
agwhitaker93
@agwhitaker93
Mar 31 2015 15:51
I get conditional binary operator expected
syntax error near *--help*'if [[ == --help ]] ; then'
Dan Prince
@danprince
Mar 31 2015 15:52
Did you modify the contents of the script file?
agwhitaker93
@agwhitaker93
Mar 31 2015 15:52
No
Dan Prince
@danprince
Mar 31 2015 15:52
How are you executing the script to test it?
agwhitaker93
@agwhitaker93
Mar 31 2015 15:53
With ./[file]
I made it work by putting the $* back in manually
Dan Prince
@danprince
Mar 31 2015 15:53
Sorry, I don't follow that last message?
agwhitaker93
@agwhitaker93
Mar 31 2015 15:54
I've got the automation script to make a script file with example 2 in it, but it isn't putting the $* part in for some reason
Dan Prince
@danprince
Mar 31 2015 15:54
Ah, I see.
Use the cp command to copy it across, rather than trying to execute it
If you try and include it as a string within your script, it thinks you are trying to insert a bash variable at that point
Does that make sense?
agwhitaker93
@agwhitaker93
Mar 31 2015 15:56
So I have to copy over a template instead of using echo "" >> ?
Dan Prince
@danprince
Mar 31 2015 15:57
Put that script example into a separate file, then do cp script_template new_project/script_name
agwhitaker93
@agwhitaker93
Mar 31 2015 16:01
Thanks! I tried doing something like that to begin with but couldn't get my head around it :P
Dan Prince
@danprince
Mar 31 2015 16:03
No worries
agwhitaker93
@agwhitaker93
Mar 31 2015 16:26
Could you elaborate on the second to last task please?
Dan Prince
@danprince
Mar 31 2015 16:28
By the time the tool works appropriately it will have all of the functionality it requires to create the project structure for itself
You can use it to generate a project structure including a tests folder and README example for the script itself. It's a way of verifying that it does work.
agwhitaker93
@agwhitaker93
Mar 31 2015 16:28
So we just have to run the script?
Dan Prince
@danprince
Mar 31 2015 16:29
Yeah, but you have to run it in order to create a project structure for itself
agwhitaker93
@agwhitaker93
Mar 31 2015 16:30
Oh, I see. Thanks again :P
Dan Prince
@danprince
Mar 31 2015 16:31
It's what we're here for!