Help coderanch get a
new server
by contributing to the fundraiser
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

Logic or syntax

 
Ranch Hand
Posts: 5399
1
Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I was talking to one guy, who asked me some problem. I was telling him the solution and suddenly I picked the paper and pencil to explain him. I tried to create an array of int. I was blank ...... I was not able to recollect systax for creating the array.
I wrote int i[] = new int[10]; but then somehow I found it to be wrong.
Then I said "forget the syntax and listen the logic."
But he was more interested in knowing that I forgot the syntax of creating an array then knowing the solution.
But till I go and again saw the book I could not recollect the syntax.
But point is this. Is syntax is so necessary to implement a logic??
But that guy, who was new to me .. for him, if I did not know syntax then I cant tell him logic also.
And I am sure he would not implement that the way I told him. Reason I forgot syntax of creating array in Java.
 
Ranch Hand
Posts: 1551
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
IMHO
It's the logic that's important. A good COBOL programmer has more probability of being a good java programmer than a new college grad.
I've learned 10+ programming languages. I can't remember syntax, either. Break, cycle, continue... what are the others? But, I can look at code in a language I've never seen before, have a good idea what the author is doing, and often find the bug that's causing me grief.
 
Ranch Hand
Posts: 776
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Rufus BugleWeed:
.... Break, cycle, continue... what are the others? .....


leave, iterate, goto ........
G.
 
Ranch Hand
Posts: 1365
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Guy Allard:

leave, iterate, goto ........
G.


I think Perl is 'next' or 'last'.
 
author and deputy
Posts: 3150
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Ravish Kumar:
I was not able to recollect systax for creating the array.
I wrote int i[] = new int[10]; but then somehow I found it to be wrong.


I too !. If someone ask me write java code to connect to database or read-write a file without referring to internet or a java book or even another java code written by me !.. No I can't. I'm gone. But some of my co-workers praise me i know java well
 
R K Singh
Ranch Hand
Posts: 5399
1
Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Balaji Loganathan:

..... But some of my co-workers praise me i know java well


and thats why that new guy came to me ... but he was disappointed
[ November 29, 2002: Message edited by: Ravish Kumar ]
 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So the conclusion is to become 'expert' in java,its not necessary to know the syntax well.
So any person with raw talent can become good programmer and doesn't need graduate degree(Norman Matloff et al!!)
Is that true?
 
R K Singh
Ranch Hand
Posts: 5399
1
Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by <rahul rege>:
So the conclusion is to become 'expert' in java,its not necessary to know the syntax well.
So any person with raw talent can become good programmer and doesn't need graduate degree(Norman Matloff et al!!)
Is that true?


Some times I feel so .... coz I see lot of people who have BE degree but are not as good as people who are just BA.
AW I am BE and believe me I have not used anything till now what I studied in my course.
I dont know .NET but I am sure that if I get a project then it wont take much time to learn it.
Like in java, I dont know the syntax but I know where to look for it.
That problem (not knowing where to look for )I might face initially in .NET, thats all.
 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No one has said that knowing both logic AND syntax is good though. Sometimes it depends on the task you are requiring from someone.
If I ask someone "how do I...in JAVA" I would expect him to know the syntax. I would upset if I had to wait around while he looked it up in his book or on the web.
Now, if I simply asked someone "what is a good solution...." then yes, logic would probably suffice. But, when that person tried to show me an example and forgot the syntax, well, I would still question that person.
I don't know everything about any language, but I take pride in believing that I know enough of the basic syntax that if someone asked me a question, I could not only show them the logic, but also give them an example using a language.
And if I were employeeing someone, that is what I would look for. I don't care how many degrees he/she has or doesn't have.
 
Ranch Hand
Posts: 113
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Language Syntax and language API are two different things. I believe a Java programmer should know the syntax (such as declaring an array) very well. And a Cobol programmer should know Cobol syntax. If you don't know and if I were to acess your skills, I would not be impressed.
APIs are always changing/increasing so not knowing the signature for the methods should be no big deal.
 
Balaji Loganathan
author and deputy
Posts: 3150
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Gregg Bolinger:
And if I were employeeing someone, that is what I would look for. I don't care how many degrees he/she has or doesn't have.


Feel like fighting with you!..
Do you mean to say that "You will recruit a person only if he knows the JDK1.4 API by heart in spite of his/her degrees in engineering/science field."
You are wrong!..
 
High Plains Drifter
Posts: 7289
Netbeans IDE VI Editor
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Ravish Kumar:
I was talking to one guy, who asked me some problem. I was telling him the solution and suddenly I picked the paper and pencil to explain him.
...
Then I said "forget the syntax and listen the logic."
...
But he was more interested in knowing that I forgot the syntax of creating an array then knowing the solution.


Welcome to the wonderful world of teaching.
Every person who asks you a question really has two questions. The second question is, "what's the answer to this?" The first question is "can I trust you?"
Credibility is everything when you're answering a question. Rule #1: Never come off as knowing more than you do; novices, especially, who don't know will assume you know more anyway, because knowing more than they do is an infinitely expanding field. Ironically, it gets easier to maintain an unassuming air once you have more experience and knowledge behind you.
To someone who doesn't know, techniques matter. Principles are a pain. Explain principles to a colleague, but show technique to a beginner; that's what matters to both. You can start beginners with principles -- I do that while teaching to groups -- but it's not easy, and one-on-one it's potentially quite frustrating.
Neither syntax nor logic is more important than the other. They mean different things to people with different levels of experience.
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Balaji Loganathan:

Feel like fighting with you!..
Do you mean to say that "You will recruit a person only if he knows the JDK1.4 API by heart in spite of his/her degrees in engineering/science field."
You are wrong!..


That is not what I am saying. As Tracy Woo said, API and Syntax are too different things. What I meant was is if you had to look in a book or on the web to find out how to initialize an array or instantiate an object, I would not hire you. I realize that API's are always changing, but the syntax of a language never changes. If it did, it would be a different language.
 
Author
Posts: 201
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I teach programming- C, C++ and Java. My students have problems with the logic. They can spit out the syntax, but try to figure out how to do something- It is almost like pulling teeth!!
 
Leverager of our synergies
Posts: 10065
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I just finished reading "Human Interface" book and I can't stop thinking that as much progress is there in designing interfaces for data-entry or similar tasks, as little, almost nothing is done regarding programming languages. I wish I were wrong. Java strikes me as a very poorly designed language from usability POV. I remember working with a language I had no time to learn forget to master, I just typed something that looked "right" to me, and to my great surprise it *was* right. Makes me thing that well-thought syntax of a language need not be such an obstacle.
--------------------------------
if you can imagine someone surpassing you, you should do it yourself.
Paul Graham
 
Ranch Hand
Posts: 1873
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi all,
personally i think "logic and syntax" have no interrelation.
we find some math majors with computer science knowledge who writes pretty well and efficient algorithms and solutions to problems than a complete CS major does.....
what Computer Science knowledge teach you is "how to tackle a problem knowing computers".
syntax is "ephemeral" if i can use the word but sure, while you are dealing with coding for long in a particular projects it is helpful if you make less syntax errors as there are plethora of logical errors needs to be fight with....
"logic and power of thinking Rules".
i have seen many PhD students and good managers/solution architects who might not have very good syntax knowledge but still they are so good at thinking about design of the software. the design that will entail minimum logical bugs is important. if we write logic wrong then NO MATTER how well we know syntax nobody will be probably willing to hire us as a 'programmer'.
just my 0.000002*10000 USD
regards
maulin
 
Ranch Hand
Posts: 1871
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Mapraputa Is:
I I remember working with a language I had no time to learn forget to master, I just typed something that looked "right" to me, and to my great surprise it *was* right. Makes me thing that well-thought syntax of a language need not be such an obstacle.


Which langauge is this a 6th GL or nth GL
 
R K Singh
Ranch Hand
Posts: 5399
1
Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I recently read in some site or in seminar for some tool or in installation notes .....
and on another site "why Sanskrit will be best language for programming"...
What it says .. if you want copy file1 to file2
then you can type
copy file1 file2
file1 copy file2
file1 file2 copy
means first file name is src and second is destinatioan. ordering does not matter.
And in sankrit as per what I read there, ordering doesnot matter. OR there is no as such syntax.
 
Mapraputa Is
Leverager of our synergies
Posts: 10065
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Sameer Jamal:
Which langauge is this a 6th GL or nth GL


Do "nth G" languages have syntax?
It was SAS language.
The quote below is tangenial to the topic under discussion, but interesting:
5. Syntax Is Connected to Semantics.
It's traditional to think of syntax and semantics as being completely separate. This will sound shocking, but it may be that they aren't. I think that what you want in your language may be related to how you express it.
I was talking recently to Robert Morris, and he pointed out that operator overloading is a bigger win in languages with infix syntax. In a language with prefix syntax, any function you define is effectively an operator. If you want to define a plus for a new type of number you've made up, you can just define a new function to add them. If you do that in a language with infix syntax, there's a big difference in appearance between the use of an overloaded operator and a function call."
Paul Graham. "Five Questions about Language Design"
Let's see what I'll get from Michael Ernest for it.
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Ravish Kumar:
"why Sanskrit will be best language for programming"...
means first file name is src and second is destinatioan. ordering does not matter.
And in sankrit as per what I read there, ordering doesnot matter. OR there is no as such syntax.


If I am not wrong,order of words in Sanskrit sentence matters.Sanskrit is more structured as compared to other(Indian) languages.It might be difficult to be used for programming,where pronounciation/composing simple sentences only takes hours and hours.
Finding equivalent words for 'debug,semaphore etc'in Sanskrit(or any ancient) language may be the Herculian task.
 
Ranch Hand
Posts: 583
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Michael Ernest:

Welcome to the wonderful world of teaching.
Every person who asks you a question really has two questions. The second question is, "what's the answer to this?" The first question is "can I trust you?"
Credibility is everything when you're answering a question. Rule #1: Never come off as knowing more than you do; novices, especially, who don't know will assume you know more anyway, because knowing more than they do is an infinitely expanding field. Ironically, it gets easier to maintain an unassuming air once you have more experience and knowledge behind you.
To someone who doesn't know, techniques matter. Principles are a pain. Explain principles to a colleague, but show technique to a beginner; that's what matters to both. You can start beginners with principles -- I do that while teaching to groups -- but it's not easy, and one-on-one it's potentially quite frustrating.
Neither syntax nor logic is more important than the other. They mean different things to people with different levels of experience.


well, thanks Michael I have just learnt a thing!!
Lupo
 
gautham kasinath
Ranch Hand
Posts: 583
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Howdy
Well if someone asked me for an opinion, I would say that logic is more important. Since it is logic that is translated to computer understandable form for its execution. So the simpler and better the logic, the faster understanding and better processing.
But ofcourse, when there is one who has the best logic to solve a big problem, the language chosen comes out to be a barrier in the translation.
I have experienced this quite a few times.
Time is lost not only in reframing the logic to suit the language constraints, but also in getting the translation done.
Well, I am sure you all have heard about a language called Python.
That is my favorite language. My fav. because, Python allows me to code the way I think. When I firt started to learn and program in python, it was introduced to me as a rapid dev and prototyping language.
But the ease with which the code can be done is amazing. More so, my thinking in relation to logic has improved with every program.
Writing a business object to handle string inputs from a client and do a search and run through a list from the db. in Java it really is a pin when compared to Python.
So language of choice is also a constraint.
Lupo
 
Mapraputa Is
Leverager of our synergies
Posts: 10065
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Charles Simonyi attempted to free a programmer of syntax in his "Intentional Programming" project.
"Syntax: Syntax has long been considered somewhat unimportant as the term “syntactic sugar” indicates. This term is used when there already exists some basic syntax which needs to be made more palatable for the user by the admission of the sweetener syntax, the syntactic sugar. But if, at the extreme, we consider the underlying syntax to be an abstract syntax tree, all other syntaxes become just sugar. IP takes this view. Users will directly manipulate the program tree while they view the program using an arbitrary and non-permanent syntax."
The Death Of Computer Languages, The Birth of Intentional Programming
 
R K Singh
Ranch Hand
Posts: 5399
1
Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by <rahul rege>:
If I am not wrong,order of words in Sanskrit sentence matters.


opssss sanskrit is for intelligent & natural OS.
Its a good article of 18 pages only (basically i think its for some seminar)[URL=http://216.239.37.100/search?q=cache eR8fIs4l1QC:www.iitk.ac.in/techkriti/eureka/deepali/system.pdf+Gogte+sanskrit+filetype :p df&hl=en&ie=UTF-8]this is in html[/URL]
this is the same file in original format, pdf
Now I think I can say that Sanskrit is best lang.
OR alter others languages to have good points of sanskrit. ;)
[ December 02, 2002: Message edited by: Ravish Kumar ]
[ December 02, 2002: Message edited by: Ravish Kumar ]
reply
    Bookmark Topic Watch Topic
  • New Topic