Provoked by this post: "SCN Syntax Highlighting for Dummies on SCN", I started looking into the possibility of hacking together a syntax-highlighter for ABAP – preferably a JavaScript library that can highlight the ABAP code at the time of web page load on the client side/Browser.
Way back in 2004/5, remember when we were young :) - I was putting together my first personal website www.geocities.com/rmtiwari with the purpose of sharing ABAP code and world domination :), of course. That site was long abandoned but still exist as a reminder of past at www.passionateaboutsap.com . At that time, I wrote an ABAP utility program, to download ABAP reports/functions as HTML page and *potentially* make the ABAP code presentable and readable on Web. I thought it was cool at that time – specially using html anchors to move from a form-routine or variable use to the declaration part, while reading code on web. It was not perfect or easy to use and I did not use it much myself :).
Read more »
Showing posts with label Programming. Show all posts
Showing posts with label Programming. Show all posts
Tuesday, January 28, 2014
Wednesday, October 30, 2013
Get the Joke!
I wrote a short post on Requirement Analysis and this one is about a special case that talks about - separating the joke from the requirement or other way round.
As a Consultant, Developer, Solution or Application Architect – whatever we call ourselves now a days – once in a while we get to analyse some requirements that may sound like a joke or an irony, if interpreted literally. The following might be an extreme analogy but some requirements could be along similar lines except that in the realm of software, it may not sound so ridiculous.
Read more »
Sunday, June 23, 2013
The Essence of Functional Programming and ABAP.
So what the .... is this 'Functional Programming'?
It is a programming paradigm that typically avoids using mutable state. (Whatever does that mean?)
Functional programming avoids side effects (change of state) during execution of a function. Compare that to imperative style programming, like in ABAP, where usually state can be changed by commands/statements e.g. for I/O, database operations, global variables, buffering etc.
Stateful programming is a major cause of bugs in software programs. It introduces complexity, uncertainty and affects readability of code that in turn causes bugs during initial development and even more during maintenance. Such code is not easily understandable and other programmers end up making unintentional changes during maintenance phase.
Read more »
It is a programming paradigm that typically avoids using mutable state. (Whatever does that mean?)
Functional programming avoids side effects (change of state) during execution of a function. Compare that to imperative style programming, like in ABAP, where usually state can be changed by commands/statements e.g. for I/O, database operations, global variables, buffering etc.
Stateful programming is a major cause of bugs in software programs. It introduces complexity, uncertainty and affects readability of code that in turn causes bugs during initial development and even more during maintenance. Such code is not easily understandable and other programmers end up making unintentional changes during maintenance phase.
Read more »
Sunday, October 30, 2011
Customer is always right..

except when they are wrong ;) . Well, customer is almost always right but only about the problems/symptoms they are experiencing. But sometime even they are not in a position to completely explain their problems. And the gap becomes even wider when some customers start telling you about the solution, that they think, could solve their problems rather than focusing on explaining the requirement first. Suggesting the right solution is our job.
Labels:
ABAP,
Programming,
SAP
3
comments
Monday, May 2, 2011
TWIST Continued : Importance of Intuition in Software Programming
Moving further on the topic of Intuition, I tried finding some articles related to importance of intuition in software development. According to one of these articles:
‘We typically think of Intuition as the ability to know something without having to reason about it, or without being able to give a proper explanation, in the sense of science or engineering, of it’
Another paper references the original research [PDF ] and here is a quote from the abstract:
‘ The role of intuition in software development was discussed in a most original fashion
by Peter Naur in 1984. Yet there has been little subsequent interest in elaborating on Naur’s ideas. In seeking to explain this neglect, we argue that the accepted views of software development, both within the formal and pragmatic traditions, are deeply influenced by a conceptual framework inherited from computer science and that, within this framework, making sense of the relation between intuition and software development is inherently difficult.’
If you had the privilege of working with someone who has developed a considerable expertise hence a recognized expert then you might have noticed that some of their immediate responses to a particular problem may seem like a magic. And if you enquire the reasoning behind, initially the logical explanation might be shady at best. In hindsight, however, it will all make sense. Initially, you may have a suspicion that the person has already worked with an exactly same problem in the past or even that he/she was secretly working on the current problem in-hand for past few days. But if it keeps happening regularly then you’ll have to accept it as their ability rather than coincidence.
rmtiwari: In my view, Intuition is one of the main characteristics of a person who has developed a considerable expertise in his domain about 16 hours ago via web · Reply · View Tweet
In my view, Intuition is one of the main characteristics of a person who has developed a considerable expertise in their field of operation compared to others. To clarify the kind of Intuition, we are talking about, is not a supernatural phenomenon but an ability developed through knowledge, intelligence and vast experience of working in a related domain. Deep Knowledge and intelligence are very important for someone to develop an insight. However a considerable experience of working in a related domain, building solutions and solving problems, could be the main aspect of developing Intuition.
While quantitative measure of experience is an important factor, there is no guarantee that everyone with 10+ years of experience in domain will be able to develop almost equal level of intuition. Natural talent in relation to correct career-choice and other qualities like passion, perseverance, analytical ability and an inquiring mindset could make the difference. While others quickly go back to sleep once a problem is resolved and never think about it again, those who managed to develop expertise, put enough thought on the root cause and related elements that lead to manifestation of a problem. Though such recognized experts can find the cause of the problem quickly they seem to spend more time after the problem is resolved - thinking about other possible solution that could have avoided or resolved the issue. The qualities mentioned also motivate them to ask questions, seek answers and get involved in discussions with their peers and role models.
Knowledge is an important aspect but if you think about it, Intuition helps where a proper knowledge of the scenario is un-available. While recognized experts would acquire enough knowledge, they are also aware of the fact that knowing everything of even a tiny domain may not be feasible hence for some not-so-urgent knowledge-requirements, they tend to keep the references of knowledge in their memory/notes rather than trying to learn everything about everything. They try to understand the bigger picture as soon as possible but may leave the minor details for later reference.
Perseverance and Patience are important qualities when it comes to solving problems. I remember an incident from my childhood: One of our examination papers had around 7 questions out of which 5 questions were supposed to be answered. I chose a question for answering and then later switched to another one. I told my father and he jokingly asked if I skipped the question because I could not solve it. Not sure if such provocations helped but I tend to spend more time solving a problem in-hand rather than switching to an easier one. That may have been a negative impact in some case of an academic examination scenario but proves quite valuable in real life problem solving where there is no such luxury of choice available.
One of my friends on twitter, Vijay Vijayasankar, a SAP Mentor, responded:
-
vijayasankarv: @rmtiwari intuition changes with age and experience..atleast for me :)
-
rmtiwari: @vijayasankarv thanks! I would have missed the importance of age and tied it up with experience but worth mentioning it separately as well.
-
vijayasankarv: @rmtiwari intuition changes with age and experience..atleast for me :)
-
- Does age have an impact apart from experience? While I could surely agree that in development stage of human brain, from childhood to adulthood, age can play an important part however the relevance after attaining certain age could be a matter of scientific research. To keep it simple, I’ll keep the focus on the experience.
Sometimes senior programmers show-off their years of experience in domain to exert authority as an expert on discussions, meetings, forums and Blog posts etc. You may see references such as ‘I’ve 13 years of experience in SAP hence my opinions should be given due consideration’. In case you did not get the joke, yours truly has 13 years of experience with SAP. Jokes apart, this pseudo-argument should only be used in certain scenario where it could possibly lead to resolution of conflicts or in getting attention which otherwise would have been difficult. I think it’s not completely logical to cite number of years of experience as someone’s expert status but more people resort to such claims in the event of no other means to show their expertise to an unfamiliar audience. Excessive use of quantitative measure of experience as someone’s level of expertise should be avoided since quality of experience and natural talent are major factors too.
Here are the links to some of the blogs and discussions, which consciously or subconsciously may have provoked my original tweet and subsequent thoughts.
Not sure about it yet but hopefully, To Be Continued…
Sunday, May 1, 2011
TWIST : That's What I Said on Twitter
Long time no see :) . But now I've thought of a relatively better idea that might break my ‘Developer's Writing Block’. Quite simply, I'll choose a few of my own tweets, will add value and transform those 140 characters into a shiny new Blog Post . LOL. Now how hard could that be !
So let's begin. What do I need first? Right ! One of my brilliant tweets . Yeah but which one or is there at least one?
Tried Twitter Search but that didn't help much in excavating those old tweets which must have been good and now gone missing ;) . Luckily, I've subscribed to a RSS feed of my favorite tweets in my Google Reader. It was for some of my experiments that you can check under Twitter section of the Blog - it will come in handy to find my own favorite tweets easily. Settled for a recent one ;) . Rest is easy just copy-paste; the most frequent activity performed by a Programmer - when they are not wasting time over internet. There you go!
rmtiwari: I'll choose a few of my own tweets, will add value and transform those 140 characters into a shiny new Blog Post .how hard could that be ;)25 mins ago via web · Reply · View Tweet
Did not go too well, did it ! Kind of getting recursive so before it gets caught into an infinite loop of referencing each other, I better chose another one. Not a problem at all ! Plenty to choose from :)
Sunday, October 4, 2009
Infinite developers for the price of 3
Question : In a company XYZ Software International, one of the most senior and competent developers was given a task of building a new Team. For whatever reason or to keep the senior members aside for productive work, the manager sets a policy that the most recently recruited developer will conduct the subsequent interview. Assuming that a developer can ascertain only 60% of his own competency, how many developers should be recruited before the team will have an equivalent capability of 3 times the original developer. Consider the worst case scenario.
Read more »
Labels:
Fun,
Programming,
Puzzle
1 comments
Saturday, September 19, 2009
ABAP RegEx met CSV and said 'I'll keep a Tab on you'
I wrote about XML processing in my previous posts:
Arrival of RegEx [ Regular Expressions ] in ABAP should be able to put an end to the miseries, developers have been facing with string ( match/find/replace ) operations. Read more »
- Discovering a Hidden Gem :Generate Simple Transformation for XML in ABAP
- Generate Simple Transformation for XML in ABAP - Part II
As much as we like to use XML for data-exchange, there are still a lot of legacy(pre-XML) data files floating between the systems. CSV files are used for ages and there are already some functions available in ABAP for the purpose. But all these standard or custom methods of parsing CSV, require more than 10 lines of code.
[ Image and comic from XKCD ]
[ Image and comic from XKCD ]
Arrival of RegEx [ Regular Expressions ] in ABAP should be able to put an end to the miseries, developers have been facing with string ( match/find/replace ) operations. Read more »
Labels:
ABAP,
CSV,
Programming,
RegEX,
SAP
14
comments
Monday, August 31, 2009
Writing Thought-Provoking (Erroneous) Code
Do we learn from our mistakes? Probably not!.According to a research carried out at the Massachusetts Institute of Technology we learn more from our successes than our failures. Except that the research was carried out on Monkeys. Not sure if Monkeys analyse their mistakes as much as we, humans, do. At least programmers do analyse coding mistakes which in turn provokes thoughts and improve their understanding.
I was working on a quick prototype to manipulate the help-values for the status of CRM activities. I wrote following code and encountered an error message stating relation ' ' is still not supported.
Read more »

Read more »
Labels:
ABAP,
Programming,
SAP
1 comments
Wednesday, July 15, 2009
Beneath Abstraction!

Problems cannot be solved from the same level of consciousness that created it. - Albert EinsteinI was trying to find this famous quote from Einstein and realized that like software, it's actually available in many versions. I could not be sure about the original so in the end just chose one of the shortest.
Sometimes the obvious solutions are unable to solve the underlying problems, because from our level of understanding, we could only see the symptoms and not the cause. Just as an example, Socialism and Communism seem to be a very obvious solution to solve the poverty issue. "Collect money from those who have plenty and distribute among others who don't" - seems to be an obvious solution. However, we could all agree, it does not work as expected.
Basically, I am trying to relate this whole stuff of "level", "abstraction" & "consciousness" etc. with "how should we go about understanding basic software concepts and solve software problems". Read more »
Labels:
ABAP,
Programming,
SAP
0
comments
Wednesday, February 11, 2009
The 8th Habit of a Programmer !
Oh don't go on the title of this post. I am just trying to read this book called 'The 8th Habit' but my daughter won't approve. It seems only one person, who is allowed to read a book in my house, is my 2 years old daughter. Never mind.
There was an interesting post by Jeff Atwood, Don't Reinvent The Wheel, Unless You Plan on Learning More About Wheels. I won't go that far to expect programmers will rewrite the libraries and use it in live projects. But sometime a programmer should think about how the wheel was invented, at first place.
Interestingly, one of my favourite questions, which I ask during technical interviews and mainly to the junior developers:
How does a candidate react to these type of questions, is also very revealing. The programmers, who really like programming - logic, analysis etc. - they are pleasantly surprised. And those who are wrongly in this profession, will have a completely different reaction. They try to argue to prove it's an unnecessary question. They don't get the motive behind these questions.
If spelling the amount seems to be too difficult then try with a coffee corner question. I like reading threads in the coffee corner at SDN and there was a funny question by Amit Khare.
Well it does not take much of the available common sense to realize that you'll always get Amit Khare as your role model, in case you decided to calculate.
However, if you are a programmer, you may immediately get the urge to solve the logic (or maths) behind the equation, even if it's trivial.
There was an interesting post by Jeff Atwood, Don't Reinvent The Wheel, Unless You Plan on Learning More About Wheels. I won't go that far to expect programmers will rewrite the libraries and use it in live projects. But sometime a programmer should think about how the wheel was invented, at first place.
Interestingly, one of my favourite questions, which I ask during technical interviews and mainly to the junior developers:
Assume a particular programming language statement/Function does not exist as yet. Now explain how would you go about building a logic to replace the original statement / Function.I don’t expect them to explain exactly the way it should be, neither do I know it by myself. But their approach to answer this question does help in identifying the real programmers.
e.g. What if SAP has not provided a SORT statement for the internal tables? or
You need to print the amount in words and let's assume there is no function [ SPELL_AMOUNT ] available in SAP.
How does a candidate react to these type of questions, is also very revealing. The programmers, who really like programming - logic, analysis etc. - they are pleasantly surprised. And those who are wrongly in this profession, will have a completely different reaction. They try to argue to prove it's an unnecessary question. They don't get the motive behind these questions.
If spelling the amount seems to be too difficult then try with a coffee corner question. I like reading threads in the coffee corner at SDN and there was a funny question by Amit Khare.
WHO IS YOUR ROLE MODEL ?
Try it without looking at the answers.
1) Pick your favorite number between 1-9
2) Then Multiply by 3
3) Add 3, then again Multiply by 3
4) You'll get a 2 or 3 digit number.... right?
5) Add the digits together.
Example: if your number is 34, 3+4 so that your number is 7
Now with that number see who your ROLE MODEL is from the list below :
1. Mother Teresa
2. Nelson Mandela
3. Your mother
4. Your father
5. Bill Gates
6. Gandhi
7. Brad Pitt
8. Hitler
9. Amit Khare
10. Barack Obama
Well it does not take much of the available common sense to realize that you'll always get Amit Khare as your role model, in case you decided to calculate.
However, if you are a programmer, you may immediately get the urge to solve the logic (or maths) behind the equation, even if it's trivial.
Let's say the number that you choose ( between 1 to 9 ) is X.Well that does not require much of your logical skills.. so what about this? Write a program, which will generate these kind of questions, in favor of any of the selected role models :) . Have fun !!
Then the calculated number will be : 3(3X+3) = 9X+9 = (10X -X) + 9 = 10X + (9-X)
Basically, the idea is to arrange this in the form of (10*X + Y ) to represent any two digit number.
e.g. 24 =10*2 + 4
So the final number is 10X + (9-X) and that means the first digit of the number is X and 2nd digit has value (9-X). So the addition of the digits = X + (9-X) = 9.
Basically, you will always get 9 for this calculation, irrespective of your chosen number.
Labels:
ABAP,
Programming,
SAP,
SDN
0
comments
Subscribe to:
Posts (Atom)
Copyright
This site uses cookies just to track visits to this website.

This work is licensed under a Creative Commons Attribution 3.0 Unported License.