Understanding Abstraction by parameterization and specification

  • (3 Pages)
  • +
  • 1
  • 2
  • 3

31 Replies - 1356 Views - Last Post: 14 November 2013 - 12:08 PM

#16 lordofduct  Icon User is online

  • I'm a cheeseburger
  • member icon


Reputation: 2538
  • View blog
  • Posts: 4,639
  • Joined: 24-September 10

Re: Understanding Abstraction by parameterization and specification

Posted 12 November 2013 - 02:40 PM

It means that. That what he showed you.

Abstraction by parameterization is words that were chosen to mean when you use parameters in a function to make the function more general use.

His example is that.

He uses a parameter 'x' to make the funciton 'Derp' more general use so that it can multiply ANY int by 4.

That's abstraction by parameterization. Nothing more to it, it's actually a pretty simple thing.



We have two general parts to the term.

Abstraction by parameterization. The second part meaning "using parameters" and the first part meaning "describing in a more general manner". When you describe something more generally, you need a mechanism by which to generalize it, in this case we generalized by using parameters.

There are other types of abstractions or generalizations. But I'm not going to delve into them here until you wrap your head around this one.




You should excuse Modi's exasperation. It's as if you're asking what an egg is, and modi is holding up an egg and saying, "this is an egg", and you're saying "I get that, but what IS an egg?" It's like you're expecting the answer to be more complicated than it actually is... it's not intended to be complex, it's just a term for a thing, a very basic thing.

This post has been edited by lordofduct: 12 November 2013 - 02:47 PM

Was This Post Helpful? 0
  • +
  • -

#17 feoleb  Icon User is offline

  • D.I.C Head

Reputation: -1
  • View blog
  • Posts: 61
  • Joined: 24-November 12

Re: Understanding Abstraction by parameterization and specification

Posted 12 November 2013 - 02:52 PM

You seem very emotional. I'll wait before responding.

oh well, got a new person trying to help me - So, new person, you said

Quote

Abstraction by parameterization is words that were chosen to mean when you use parameters in a function to make the function more general use.


Does this only apply to functions?
Was This Post Helpful? 0
  • +
  • -

#18 lordofduct  Icon User is online

  • I'm a cheeseburger
  • member icon


Reputation: 2538
  • View blog
  • Posts: 4,639
  • Joined: 24-September 10

Re: Understanding Abstraction by parameterization and specification

Posted 12 November 2013 - 03:01 PM

When it comes to Abstraction by parameterization?

Technically no.

It deals with any construct that can have parameters.

The available constructs depend on the language/technology you're using.

Thing is, what is a function?

Not all languages have functions, for example an old BASIC program doesn't have functions and is instead just one long routine. That routine though can still accept parameters.

But also at the same time various technologies and languages have interfaces that for all intents and purposes can look like what you might call a function.

For example I just wrote a named pipe server this morning that accepts binary data that carries a request name and data that should be operated on depending the request name. That request name could technically be considered a function name, and the operation the implementation of the function, and the data passed with the request name are parameters.

This post has been edited by lordofduct: 12 November 2013 - 03:01 PM

Was This Post Helpful? 0
  • +
  • -

#19 feoleb  Icon User is offline

  • D.I.C Head

Reputation: -1
  • View blog
  • Posts: 61
  • Joined: 24-November 12

Re: Understanding Abstraction by parameterization and specification

Posted 12 November 2013 - 03:11 PM

So abstraction is just using parameters that are placeholders for information that would take up more space than just the placeholder? Is it considered abstraction when there is no data? or just in instances where there is? So say I have a string or variable but it contains no info - that's not abstraction by parameterization because there is nothing to abstract from?
Was This Post Helpful? 0
  • +
  • -

#20 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 9392
  • View blog
  • Posts: 35,273
  • Joined: 12-June 08

Re: Understanding Abstraction by parameterization and specification

Posted 12 November 2013 - 03:15 PM

An empty string is still a string.. an integer that's value is 0 is still an integer..
Was This Post Helpful? 0
  • +
  • -

#21 lordofduct  Icon User is online

  • I'm a cheeseburger
  • member icon


Reputation: 2538
  • View blog
  • Posts: 4,639
  • Joined: 24-September 10

Re: Understanding Abstraction by parameterization and specification

Posted 12 November 2013 - 03:19 PM

Abstraction is not using parameters that are placeholders, etc etc.

Abstraction by Parameterization is.

"Abstraction" and "Abstraction by Parameterization" are different. "Abstraction by Paramerization" is a KIND of abstraction, there are other kinds as well.

It's like saying "Kiwi fruit is a kind of fruit, Kiwi fruit is a fruit that is green on the inside and brown and furry on the outside, it is native to New Zealand". Difference between "fruit" and "kiwi fruit".

And empty strings or integers are still strings and integers.

Abstraction has nothing to do with state. It's actually the opposite of that, it's about describing a situation in a manner where you don't know the state, but that doesn't matter.



You took Algebra right? Algebra is an abstraction of arithmetic. Well it's a syntax and set of rules that allows you to abstract arithmetic, to be precise. You use variables (yep, just like in programming, and there's a reason for that) to represent a possible state for a number (or set, algebraic function, etc) so that you can describe an abstraction situation.

Concrete algebraic abstractions are things like:
y = mx + b
This abstraction represents all possible straight lines formatted in a way where we can easily extract the slope of that line as well as it's y-intercept. It is an abstraction because it is stateless... it doesn't describe a single line, it describes ALL lines (well a certain type of line... I'm not going to get into the semantics of what 'line' means in geometric terms. Nor the fact that odd things can be put in place of the variables to create more complex geometric constructs that are transformed by this line... go take linear algebra if you're interested).

This post has been edited by lordofduct: 12 November 2013 - 03:26 PM

Was This Post Helpful? 0
  • +
  • -

#22 feoleb  Icon User is offline

  • D.I.C Head

Reputation: -1
  • View blog
  • Posts: 61
  • Joined: 24-November 12

Re: Understanding Abstraction by parameterization and specification

Posted 12 November 2013 - 04:27 PM

So what's the point of saying abstraction by parameterization when you could just say 'using a variable' or 'using a string'? It just seems like extra syllables for no reason.
Was This Post Helpful? 0
  • +
  • -

#23 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 9392
  • View blog
  • Posts: 35,273
  • Joined: 12-June 08

Re: Understanding Abstraction by parameterization and specification

Posted 12 November 2013 - 06:33 PM

... because saying "abstraction by parametrization" encompasses all those.. one may say it is linguistic abstraction to apply to the theory that groups all those areas.
Was This Post Helpful? 0
  • +
  • -

#24 lordofduct  Icon User is online

  • I'm a cheeseburger
  • member icon


Reputation: 2538
  • View blog
  • Posts: 4,639
  • Joined: 24-September 10

Re: Understanding Abstraction by parameterization and specification

Posted 12 November 2013 - 08:43 PM

because what you're writing your program in might not have definitions for string or variable.

The term is in context of abstraction, so thusly its terminology references that context.

You have to understand, C, C++, C#, BASIC, Java, Lisp, python, ecmascript, assembly, punch cards, blahdy blah... these are all languages, programming languages are an abstraction of machine code that is ran on a computer. We can't read that stuff (or at least it's really really really hard and annoying to read making it inefficient to do so). Now these abstractions attempt to make it easier for you to program. It does this creating a syntax and structure to represent various kinds of abstraction. We organize these kinds of abstractions, and we name them.

Now, how this abstraction is accomplished within a language may vary. And the abstractions that are available vary from language to language. Certain groups of abstractions that follow a similar model might get considered a "paradigm".

Note, I'm kind of rambling here as it's late at night and I'm tired, but I'm trying to give a very basic scope to what you're dealing with.



It's like this... a verb is a action word. This is an abstraction of all action words. We have a word to describe all action words. We could say "action words", but instead we say "verb".

We wouldn't say, "words like run and fall and swim"... those are examples of verbs.

Using a variable is an example of abstraction by parameterization (well... technically).

Get it?




It's nomenclature, these are the words that academics decided upon to call things. Now you might have "easier" words that aren't exactly the best at conveying what they mean... and you're free to use them. But from an academic point of view, these terms are useful and were selected for their usefulness. The fact you may not recognize the quality of the term is merely a sign that you're not as experienced in the terminology. When grouped with all the words, it all starts to come together. Just wait, you'll see.

In the end, think of it like this.

We need some nomenclature, doctors say things like 'coronary bypass surgery', physicists say things like 'mass energy equivalence', us computer scientists say things like, 'abstraction by parameterization'.

They're not just big words to sound smart with (though they do that as well), they have meaning that can be interpreted by a trained professional in that field of science.
Was This Post Helpful? 0
  • +
  • -

#25 feoleb  Icon User is offline

  • D.I.C Head

Reputation: -1
  • View blog
  • Posts: 61
  • Joined: 24-November 12

Re: Understanding Abstraction by parameterization and specification

Posted 12 November 2013 - 08:53 PM

Could you give me a real world example of when you ever need to describe something that way? I think this is all very difficult for me because I've read very many definitions of abstraction by specification and they all seem to be worded much differently than each other. It's like there's no standard definition, and all of them are hard to understand, are there no examples of its use in a sentence and/or with any particular set of code. I mean there probably are simple definitions with nice examples, but I haven't found any yet.

This post has been edited by feoleb: 12 November 2013 - 08:54 PM

Was This Post Helpful? 0
  • +
  • -

#26 lordofduct  Icon User is online

  • I'm a cheeseburger
  • member icon


Reputation: 2538
  • View blog
  • Posts: 4,639
  • Joined: 24-September 10

Re: Understanding Abstraction by parameterization and specification

Posted 12 November 2013 - 10:59 PM

What is real world?

I described when the term is used, it's an academic term, you use it in academia.

You don't have to use the term every day of your life. It's just the term exists. The fact you don't use it every day in the "real world" doesn't make it any less a term with a meaning. Go on your way, use the word variable when you wanna describe variable, but somewhere in a book or somewhere with an academic, they'll be thinking "oh, he just used an abstraction".

Really dude, you're way over thinking this.



Now you're talking about 'abstraction by specification', which is not the same as 'abstraction by parameterization', note the 3rd word is different! So yes, the definitions will be different.

Now if you read from two different sources the definition for 'abstraction by specification', and get 2 different definitions from it. Well... I'd love to these differing definitions... I have a feeling they are more similar than you think and instead the confusion is coming from an inability to understand the definitions giving. Evidence for such was your inability to grasp the definition for 'abstraction by parameterization'.




I need to stop this, I'm getting frustrated like modi was. I feel for whoever has you as a student, you must... require a lot of patience.

This post has been edited by lordofduct: 12 November 2013 - 11:05 PM

Was This Post Helpful? 2
  • +
  • -

#27 feoleb  Icon User is offline

  • D.I.C Head

Reputation: -1
  • View blog
  • Posts: 61
  • Joined: 24-November 12

Re: Understanding Abstraction by parameterization and specification

Posted 14 November 2013 - 09:58 AM

A philosophy major can talk about chairs and black holes all they want, but I ask for a real world example of someone experienced in computer science and now there is something wrong with me. I like your logic sir.

So just to reiterate, to see if I'm grasping this properly, abstraction is simplification by removal of any unnecessary parts. Abstraction by parameterization means simplification via placeholders or categorization - any way you can group several components into lesser amounts of components. For example, instead of writing code for each of 100 individual squares to be drawn, you might write a for loop to draw them all and save yourself a bunch of code?
Was This Post Helpful? 0
  • +
  • -

#28 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 9392
  • View blog
  • Posts: 35,273
  • Joined: 12-June 08

Re: Understanding Abstraction by parameterization and specification

Posted 14 November 2013 - 10:03 AM

Yes that is one example.
Was This Post Helpful? 0
  • +
  • -

#29 feoleb  Icon User is offline

  • D.I.C Head

Reputation: -1
  • View blog
  • Posts: 61
  • Joined: 24-November 12

Re: Understanding Abstraction by parameterization and specification

Posted 14 November 2013 - 10:11 AM

Ok, so in regards to Abstraction by specification, in relation to programming, that would be dividing up a program so that you can work on the parts individually? It's simplification by working on specific parts of a problem you are using a program to solve it? That way you can allow better troubleshooting if issues come up, and if you want to add to parts its simpler because you have the program already divided into parts?
Was This Post Helpful? 0
  • +
  • -

#30 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 9392
  • View blog
  • Posts: 35,273
  • Joined: 12-June 08

Re: Understanding Abstraction by parameterization and specification

Posted 14 November 2013 - 10:23 AM

q1: Sure.

q2: Sort of.

q3: That is one of the positives.

q4: I guess.
Was This Post Helpful? 0
  • +
  • -

  • (3 Pages)
  • +
  • 1
  • 2
  • 3