Category Archives: Software Engineering

Software Development Partner for SMEs

The Importance of a Software Development Partner for SMEs?

Small and medium enterprises that been highly successful are found to have at least two things in common – relentless focus on the fundamentals of their businesses and the uncanny knack of identifying and riding on a market/technological wave. There is also another common thread that connects them all, one witnessing an exponentially rise in its relevance– ‘Information Technology’ as an enabler. Not surprisingly, the one question that gets discussed in any SME nowadays is: “How do we meet our software development needs?”

Developing software in-house is definitely an option. But it can only be pursued by trading off against investing the resources in the core business activities. The alternative course lies in outsourcing all the work to a partner who has the required expertise. Software development is a specialized field. It requires focused and continuous effort to build capabilities to deliver, and upgrade to avoid the risk of oblivion. Thus, a reliable software development partner is priceless. Here’s why

……………………………………………………………………………………………………

Quality vis-a-vis Tenure?

The length of time a software partner has been in operation indicates how well it can adapt to the shifting demands of the industry and its clientele. A longish tenure essentially means that their investment in software engineering processes and related measures are robust and that the company can ascertain the benefits of expertise and flexibility in their engagement. Their deliverables, thus, are expected to be of a certain distinct level.

Technical Knowledge

It being its core area of work, a capable partner can provide quick access to technical skillsets with both depth and breadth of expertise. Building such capabilities in-house requires a continuous expenditure of time and money. The same if accessed through a partner relives an SME of a lot of headache. Infact, the services of multiple outsourcing providers can also be availed if the needs are varied, thus enabling the SMEs to be nimble-footed in responding to market opportunities.

Expense

The overall cost of establishing and maintaining a software team is quite high. It involves cost attached to hardware, software and most importantly acquiring and retaining relevant talent. Outsourcing offers the privilege of flexibility, for ramping up and down of resources, and of getting access to the exact type of technological expertise to handle exact needs and fluctuations in work generation.

Domain Knowledge

Seasoned developers with a track history of successful project execution in a certain domain can recommend the best of the industry practices while offering solutions. Domain knowledge translates to better and faster identifications of gaps, precision in technological solutions and identifying opportunities for improvisation.

Crisis Management

The true test of the character of a software partner arises during instances of crises. Software companies, which have served multiple clients over many years, end up facing multiple types & instances of crises during the tenure. The experience equips them to respond to such situations better in the future. The more diverse the experience of the partner the better the response expected.

……………………………………………………………………………………………………

If the benefits of outsourcing to a partner seem businesswise prudent, then caution needs to be exercised in its execution. Just identifying a player is not good enough for the purpose. One runs the risk of being limited by the capabilities of the services provider in the long run. It needs to be ascertained that the partner is doing enough to keep pace with the rapids changes in the field of Information Technology. Besides that, exploring various models of engagement is also an important aspect of any partnership.

How much an SME truly gains out a partnership with a software development company is directly proportional to these factors mentioned above.

……………………………………………………………………………………………………

If you have any queries in this field, talk to Mindfire Solutions. For over 19+ years now, we have been the preferred Software Development Partner of over 1000+ Small and Medium-sized enterprises across the globe.

Spread the love
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  

Software Product Development Best Practices

Software Product Development Best PracticesThe digital technologies enable enterprises to automate various business processes and operations. But the technological needs differ from one enterprise to another. Based on the technological and business requirements, programmers nowadays have to write a variety of custom software products – desktop applications, web applications and mobile apps. Each type of application is built to meet specific business needs and based on predefined business requirements. Continue reading Software Product Development Best Practices

Spread the love
  • 6
  • 2
  •  
  •  
  •  
  • 1
  •  
  •  
  •  
    9
    Shares

3 Trends in Software Developer Roles – And One to Avoid!

 

Three roles have been evolving in software development over past few years.

1. Devigner

The devigner is a person who packs a pretty punch. She is a graphic designer, UI designer, UX developer, server developer and database developer all rolled into one. Continue reading 3 Trends in Software Developer Roles – And One to Avoid!

Spread the love
  • 2
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
    2
    Shares

Thoughtful Programming Can Save Days. But Do You Have Time For It?

 

Today I will share an experience in the effects of inflexible software, actually caused by hard work!

We use a SaaS service for our payroll process. Last month, we needed to add a salary component for selected people. We decided that instead of adding it as the pre-defined “Bonus” component, we would name it “KMBonus”.

All good till now. The payroll system allows addition of custom components. Then you download a blank Excel file and upload it back after inserting figures.

We downloaded the template which had a column for KMBonus, along with columns for every other component. This sheet was filled for KMBonus and uploaded back. It failed. No error message, nothing – the page just refreshed silently.

What was wrong? Was it a problem with file format? File size? Number formats? Did columns or sheets or anything get rearranged by mistake? This took a couple hours. When nothing worked, a support issue was filed. It was a weekend.

On Monday, support tried to understand what was wrong. After few hours, and with the file being analyzed, support figured out what was wrong – the uploaded file couldn’t have empty cells/columns while being uploaded back! So, although you wanted to update only KMBonus column, you had to either insert zero into every other cell everywhere, or delete all other columns.

First I was upset – that a simple error message, or documentation on expected file format, would have helped avoid this. Then I realized something else.

Entire payroll for hundreds of people got stuck for a couple days, because the programmer had worked hard – but harder than necessary.

Think about code structure. It would have taken more work, more effort, to put in all this validation – “Check all cells have numbers, ensure none are blank!” Sure, requirements may not have covered this case, so as a programmer I am free to do anything. But if I am free, do I do things after thinking about it – being thoughtful about work? Do I do things for the user – being thoughtful about users? Or do I do things that are just technically correct? Instead of tightening by validation, a simple conceptual foundation would have reduced the programmers’ work and rendered flexibility to user!

Imagine if the conceptual foundation had been: any blank cell means nothing is to be done. If something has a number, update component to that number. Simple.

So when you get a sheet with many cells blank, entire columns blank, ignore the blank ones. And process only the ones with numbers. Did I say simple?

Think of code. This is actually less work, is conceptually clear, and means much more to user! Smart work versus hard work. Saves days of effort for the programmer. And, in our example, a difference of days in payroll processing!

Thoughtful programming is based on common sense. Thoughtful programming reduces work. Thoughtful programming can save the day. Days.

 

Spread the love
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
Product Engineering

Product Engineering and User Experience process.

What is Product Engineering?

Product engineering is known as the process to develop or design, system or a device such that the product is treated as an item for sale or to be used by various people. When a product is being developed, there is a lot of work and technology involved in the development process. This overall process is called as product engineering. Product engineering is usually called as an activity dealing with issues of cost, reproducibility, quality, performance, reliability, serviceability and user features. If the process goes through a proper creative way the outcome is awesome.

The term product engineering is; developing the concept and the design of the product and development of its mechanical, electronics and software components. For example: developing a smartphone. Now-a-days smartphones are very popular in the market and a lot of new and old companies in the way of competition, give away better product feature to customers. A product like smartphone includes a set of different features like designing the body, it’s hardware components, packaging it in a small space, developing the electronics that controls the various components and lastly developing the software which will operate all the features of smartphone known as the Operating System.

Here are some skills taken care for product engineering process
– Product statistical methods and tools
– Hi-tech manufacturing process
– Product reliability and user research
– Computer-aided design and simulation programs
– Strong knowledge product platform which the product will use
– Strong analytic work methodology and problem solving skills

In software industry, the term Product Engineering is used as development process of a software or an application. From making of prototype to final release of the application process, it is called as product engineering of the application.

Product engineering of an application. Points that everyone should follow:
– Prototyping of the complete application. (Visual Concept)
– Structural designing or User Interface designing.
– UI or Front end development. (What browser or compiler will read?)
– Backed or functional development. (Through which user will carry out work.)
– End user testing and bug fixing.
– Final product delivery.
This depicts the entire process for a successful web, desktop or mobile app.

What is user experience?

User experience is combination of two words, “user” and “experience”. The experience of a user towards a product or an application is called as User Experience. UX or User Experience in other term can be explained as the emotion of a user when he/she uses it. It may be good or bad. The good experience of user towards a product plays a vital role in the product’s success.

Let me give you a simple example. “One day at night you came to know that you have to reach office early in the morning at 7AM the next day to attend a meeting. For that you set your alarm at 6AM and go to bed. When you wake up in the morning and see that it is already 6.30 AM and the alarm hasn’t rung. You found that, the alarm is off due to battery drain out. You rush to the coffee vending machine for a cup of coffee but only to find out that there is no coffee. You could trace out that the machine is not connected to the power source. In the process you have already lost some time.

Then you get ready for office in 10 mins. While going to office by your car you face a lot of traffic for some unexpected reason. Then you notice that you are running out of fuel. So, you have to drive to a nearby petrol pump only to find out that the petrol pump does not have a card swipe machine. You rush to a nearby ATM and withdraw money. Finally, after fighting out so many obstacles, you reach office only to find out that the lift you use to take daily to reach to 5th floor does not work. Then you are forced to take the stairs and when you reach you find that the meeting is over and your colleagues have started work.
If everything would have fallen in place, you would have never missed the meeting.

The software or system that misguides you and does not help you achieve your goal is an example of bad user experience. Example – Google mail is most popular web application than other mail client for its good user experience. I personally like Google+ than Facebook because of its user friendly features and faster response. Looks doesn’t matter in the process of user experience. Please look at the two images which is called Donald Norman (design and usability engineer) Coffee Mug.

Norman-CoffeePotMasochistNorman-TiltingTeapot-H

User experience has a vital role in software product engineering. Deep user research is key to success for better user experience. Taxi for Sure – A Driver app developed by a start-up company in Bangalore is a very famous app for taxi drivers. People use it for daily for hiring taxis. This free mobile app is very popular due to its user experience.

Key concept for better user experience.
– Deep user research. Feel the user motion
– Minimal and clean design of application
– Less page loading time
– Quick navigation through the functionalities
– Readable typography
– Minimum page refresh
– Avoid long loading graphics
– Graphical representation of functionality, by which user can understand the function easily without reading long text description.
– End user testing with exact devices.

Happy Designing 🙂

 

 

 

Spread the love
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  

The whole is greater than the sum of its parts

This truism is applicable to all, whether it is an individual or a company. The various facets which confluence to make an entity great render to it a unique flavor, one that cannot be copied completely. The innovative practices at Mindfire Solutions contribute towards its uniqueness and differentiate it from its peers in the software industry. Here’s how.

My last blog was on the 2 minute innovation where I told you how Mindfire Solutions follows a unique project status communication practice which makes use of rich media to communicate the day’s progress to the client. In this blog you will get to know yet another innovative best practice followed at Mindfire Solutions. Ever heard of the term collective intelligence? No? Well, simply put, it means 2 is better than 1. Only, in our case 700 is better than 1. This is an approach aimed at solving individual queries by the combined knowledge of an organization.

We all know that the true value of an organization can be closely gauged from what lies between their employees’ ears. And Mindfire Solutions not only encourages its employees to broaden their horizons but also gives them the scope to make the best use of it by fostering a culture of sharing. As time passed, number of projects increased and Mindfire’s numbers and ranks swelled, realization dawned that although the collective knowledge of the organization was increasing linearly the individual knowledge was more or less limited to his own area of expertise. Owing to a demanding work scenario and paucity of time there was hardly any scope to learn more at an individual level. In an organization where knowledge is treated as the most important asset, productivity would get a quantum boost if there was some way in which the information about the knowledge and skills of an individual can be shared with another individual in need.

And then a unique knowledge management practice was developed in Mindfire Labs and christened as Fluid Expertise. Based on his need, a Mindfirean can use this system to search on the particular topic and then get the content results as well as the list of colleagues who can help. The database for this project consists of the user profiles of all the employees (which include their expertise, blog links, seminars conducted, articles, projects, team space etc.) as well as the articles, tips, case studies etc. contributed by them and available on the website. The search results will be displayed to the user in his browser in a 2 part sectioned format. While the upper half contains the people search results (in this case Mindfire’s in-house subject matter experts), the lower half contains the results from a Google customized search. The user can then choose to proceed according to his wish, i.e. contact the expert on a communication window or click on the pages as suggested by Google.

How the system works?

The system either crawls through the website or parses text/html, word documents and PDFs and considers the content for further processing. Again in order to match the query against the document the text in the document is indexed. The match can be done against the URL, title or the description/content of the page and when the user clicks on the URL the content will be displayed.   As is expected, a lot of inputs are required to find out the top ten subject matter experts on a particular topic. And because we have too many inputs it becomes imperative to decide which among these inputs are primary and which ones are secondary. The primary inputs help in choosing the top 10 people and thereafter, the primary and secondary inputs both are used to rank them. The secondary inputs don’t have a role to play until the top helpful persons have been selected. The decision as to what could constitute the primary and secondary factors are left to the system owner’s discretion.

Following are some of the factors that contribute greatly in people search listing:

1. Content:

Content has to be the most important factor to judge the level of an individual’s expertise. With the help of an open source indexing engine and a compatible server which helps add easy interfaces to add/update/query documents and pump more data, an expert’s contribution is closely gauged in his area of expertise.

2. Number of User clicks:

For a specific search the system will track which links has been clicked by which user and which expert has been contacted by which user. This knowledge will be useful for predicting the result for the user thereby providing personalized search experience.

3. Peer Endorsement:

In this case the system will take time to learn from user input and suggest right people and direct the user to the expert. To address this, there will be an offline input mechanism where employees should be able to specify who is an expert in which area. This will also form a part of the database.

4. User Feedback:

While designing the system we realized that there should be an offline data collection mechanism to know whether contacting a person helped, in short a feedback is sought. Initially the system gives a default people rank to everybody. After collecting inputs from various users the people rank increases or decreases accordingly.

5. Interconnections:

This factor varies from person to person. As the name suggests, these variables play a role to decide how easy it is for A to connect with B. This is determined based on the fact whether the 2 users belong to same team, same project, same center, same team space etc.

6. Previous search:

To get this data the system should be able to store old searches by users and match the current search against old search and find relevant experts to solve the query.

In order to get near accurate rankings of the resident experts at Mindfire Solutions these parameters are constantly monitored and at times subjected to minor changes to give an appropriate listing. And in this way we make use of information readily available to not only solve client issues but also increase our knowledge base on a particular topic by learning it from the guru himself.

These systems and processes at Mindfire Solutions make it robust inside out. And when a customer engages with Mindfire Solutions, although he would interact with a small team, he would definitely feel the depth of knowledge in his work which is largely due to the collective intelligence behind it. That is what contributes to making Mindfire Solutions an enviable organization to work with and work for. Who wouldn’t?

Spread the love
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  

Why Automation – Is it worth?

Automation Testing

Automated testing is need of the hour. Possibilities of the automation, apart from custom manual testing, are being analyzed for every other application now-a-days. It is preferred to manual testing due to several factors such as improved accuracy of tests, wider test coverage, more reliable results and above all, it saves time and cost rapidly.

Testing manually, on the other hand, is time consuming and error prone, hence can result in defects being left out. Having said that, I would like to analyze the positives of automated testing over manual as is generally said. Basically, it’s not always advisable to automate the AUT (Application under test) as opposed to prevalent myth about automation.

Automation can be accurate in giving reliable results with wider test coverage while saving time and cost, but this may not always be the case with all AUTs. Imagine the AUT with ever-evolving requirements and dynamic webpages. Here, Automation may be accurate with wider test coverage but will consume much more time and cost giving unreliable results due to system instability. In case of UI based AUT, if design changes frequently the automation is strictly discouraged. Further, choosing an inappropriate tool can lead to reduced efficiency as tool selection largely depends upon the technology used in the AUT.

It can be said that automation is the best way to increase the effectiveness, efficiency and test coverage of testing but only when proper analysis of AUT is made before shifting to it, else certainly a bad idea if its objective is not clear. Also, deciding on what to automate is most vital task before planning any automation process to follow. It is not possible to automate everything ; nevertheless modules that are stable and are manually tested at least once should be taken for automation. Test Cases that are executed repeatedly and consume time could be a priority, making the automation best suited for regression testing or retesting of the fixed issues. Descriptive test cases that are clearly explained are automatable and not the vague ones. Apart from regression, it can test stress, load and performance of the AUT.

Hence, Automation should be taken up only after analyzing the AUT and determining if the automation will actually be time and cost effective or otherwise.

Spread the love
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  

The 2 Minute Innovation

And before you come to a seemingly easy conclusion, let me be very clear. I am definitely not talking about Nestle’s Maggi noodles which can be cooked in about just two minutes. So what could be the 2 minute innovation? Ever heard of 2MV (short for 2 minute video) as a daily reporting tool? Possibly NO! Allow me then to introduce you to the 2MV Habit that is religiously followed at Mindfire Solutions.

About the 2 Minute Innovation 2MV:

The 2MV Habit is a unique practice followed at Mindfire Solutions. This was exclusively designed to address problems that are typical to outsourcing/off-shoring/remote software development companies. The common problems pestering this industry are:

  • lack of visibility in true daily work progress,
  • absence of the human factor,
  • lack of synchronous communication owing to different time zones and
  • unavailability of rich communication possibilities (email and documents have their own limitations)

We call it the 2MV Habit because it is a daily practice wherein the developer records his daily progress in the form of 2 minute long videos that are actually screen-casts (videos of the screen) with the audio commentary by the developer. This could also include a little bit of code browsing as well.

So how does it differ from emails/documents?

The use of video/media differentiates 2MV from an email/document by creating software engineering artifacts that are rich in information. After some initial hiccups the developer realizes that while he can make a 2MV in 2 minutes, he would take around 5 minutes to draft an email/document. However, on the flip side, while the contents of an email/document can be scanned in a minimum 10 seconds time, it would actually take 2 minutes to go through a 2MV.

How the 2MV works?

Clients can log in to Mindfire Solutions’ cloud based project management system with the credentials that are provided to them at the time of on-boarding. Successful login takes the client to the 2MV home page wherein all recent activity is listed as a stream of events. One can then view the 2MVs by clicking on the 2MV icon which renders a flash / HTML5 player and plays the video on the homepage. Comments can be made from the event stream itself. There are also options in the account menu to change the email preferences on new 2MV upload, note addition, transcription addition and resetting of password etc.

2MV workflow

Benefits of using the 2MV Habit:

  • Giving demos daily helps the developer to view the work from the user’s perspective
  • The developers feels accountable to produce demonstrable work every day
  • The human voice renders a personal touch and helps forge better relationships in a remote team environment
  • It also helps the developers bond better with the software QA testing professionals bringing in better coordination between teams
  • Easier, faster and better daily status reporting
  • Instills a sense of ownership in the developer as the 2MV carries their personal signature
  • Rich knowledge base with visible gradual evolution of software and codebase
  • Any misunderstanding with respect to requirements or specs is detected at an early stage and fixed accordingly
  • Easier, faster and better transition to new team members whether in case of attrition or scaling up the existing team
  • Better insulation from human risks in team

A 2MV experience:

Let’s be honest. Everyone was not really enthusiastic when the 2MV was launched. As with just about anything that is new, there was some resistance to 2MV initially from one of the project teams. This was mainly because they were not comfortable recording the video (Ironically, they assumed it would take them more than 20 minutes to record a 2MV). Also they wanted to hang on to the traditional methods of email and online meetings with the client as they believed that they could email faster than record the day’s work in 2 minutes. Before panning it completely, they were coaxed to give it a try, one last time. And then the rest is history. The client loved this mode of communication and decided to use this method instead of emails and meetings. This helped them cut down time spent on meetings. Finding a time suitable for both the development team and the client was again a hindrance, but the 2MV helped get rid of it. The developer could record his day’s work before he left and the client could review it whenever/wherever he wanted to using any device (desktop/laptop/handheld). In this particular case (and as with most other cases), the client not only applauded Mindfire’s effort but also gave valuable feedback that we incorporated subsequently.

For a company that is ONLY into offshore small team software development, Mindfire Solutions offers its clients this unique status reporting tool that not only adds a personal touch but is also a rich repository of evolving project information. One of our clients commented that:

“We’d just like to say what a great idea the 2 minute video is in maintaining a good relationship between us and Mindfire. It is often difficult to build a personable relationship over such a distance but we feel this definitely helps! Seeing the developer’s computer screen brings things closer and enhances trust and support.”

Yet another client found 2MV to be an interesting concept and was of the opinion that:

“A 2-min video is best for more general info and UI demonstration.”

As for our developers, most of them appreciate Mindfire Solutions for this initiative as it has helped them better their communication skills. The fact that the client can add comment in the 2MV itself makes the communication very clear and less time consuming. One of them said, I have also spotted some issues in my code while making the 2 MV at the EOD. So, it’s like testing the whole thing you have worked on before you leave for the day :)”

And when I asked another developer how the 2MV is a mutually beneficial initiative he said,

“It helps to make changes on the work from the beginning as client provides feedback on the work from the scratch level where as in text emails client sends changes/fixes only after seeing the complete task on stage and its sometime difficult for the client to visualize the work from text and provide feedback. Also it helps the client in decision making whether or not to continue/pause the current functionality and jump to some urgent fixes.”

As 2MV is increasingly becoming popular as a project status reporting tool, it would not come as a big surprise if clients begin to choose this as a preferred mode of communication over email and Skype. We surely live in interesting times!

(N.B. : Mindfire follows small team software development very seriously and there are many such practices at Mindfire Solutions. Watch this space for more innovative techniques/processes practiced at Mindfire Solution. We use technology to be efficient!)

Spread the love
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  

Who Should Software Developers Care About?

Manager/Lead or Client – who should developers care about?

Neither.

Software developers in outsourcing companies are a harried lot.

Demands come from multiple quarters – Lead or Manager, Client, Colleagues – to name a few. Sometimes a CEO and other random people are also part of the group. In large organizations, Marketing, Interaction and other teams join the party. And often there are multiple people of each type above. Time is always running out. And sometimes none of these people agree among themselves! What is a software developer to do in such a situation? Who should s/he care about? Who is most important?

None of them.

Software is made for a purpose.

That purpose is to be used by people for something. The only thing that matters in making software succeed, is whether Users will use it. If Users use your software, everyone will be happy. If Users don’t care, everything is wasted.

All the people above – Lead, Manager, Client etc – are representatives for the User. They are people with good intentions, but they are maya – illusion – from the software’s perspective. The only thing that software cares about is whether Users use it or not.

Software that is used is happy software. Software that is unused is grumpy software.

It follows logically that if software cares only about its use, the developers of that software should primarily care about the User. Generally, Client and Lead and others are also doing the same thing – they are planning and prioritizing and designing and doing everything for final User.

But!

Your Lead may find a short-cut that ignores user. Your CEO may want something done that is good for your company but bad for user. Your Client may prioritize something where user is short-changed. On top of this, ego and personal views may come into play.

In short, sometimes (although rarely) these other players may not have user in mind. In such situations your duty is to ignore them. If you can make them see reason, good. If you cannot, you still know what is right and wrong, because you know who to focus on – the User.

Your final responsibility is to the User. Your job is to make good software that Users love.

As a developer, your User is unknown, faceless and often doesn’t exist except in the future. It is easier and tempting to think of the representatives as real, and the User as maya. At core, it is just the opposite.

But my Client pays my company! But my Lead decides my salary!

In the place-time continuum of life and careers, you will find that the experience of making good software is what you will carry forever. Everything else will float away. Your Company will change, your Colleagues will change, your Client will change, your CEO will change, your Lead will change. But that experience of making good software that users use and love and you are proud of – that experience of exhilaration, that pursuit of excellence – that  will never go away.

As humans, we sometimes do what our head tells us, and sometimes what our heart tells us. But through it all, our conscience guides. Think of Clients and Leads as head and heart, and User is conscience. Client and Lead may tell you what to do, but let User be your guide throughout. As in life, so in work.

Use Users as your yardstick in all situations.

When in doubt, think of Users. When not in doubt, think of Users. Everything and everybody else is maya.

 

Spread the love
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  

It isn’t Hard to Hard-code!

Recently I came across an interesting programming situation.

Parts of a web-based system stopped working suddenly, with nothing significant having changed. After some finger-pointing and accusatory guessing, it was discovered that some scripts on server side had been shifted from /root/1level to a deeper nested folder, let’s say /root/1level/2level. So far so good.

What happened next? Why would that make a system stop working?

Code needed to find path for some processing. The code split on first backslash to find file name, implicitly assuming that the file would always be one-level deep from root. When the file was shifted into a deeper folder, the path extraction stopped working.

There can be arguments about whether the admin should have shifted files into a deeper folder without informing developer, or why this should not have been done at all, and so on. But I consider this a clear elementary programming mistake of the hard-coding variety.

Hard-coding does not mean just typing in numeric or string literals into code, although that is the obvious college-level hard-coding. X = 420 or sEndDate = “1/1/2022”. It also means any type of inflexibility embedded right into the code and program. Hard-coding means not understanding the need for flexibility and not writing elegant code that can adapt to its surroundings.

Hard-coding is called “hard” coding because anything hard cannot be molded to suit the need at hand, because it is inflexible. Like when you put in an assumption that your file is one-level deep,, which makes it inflexible to run when its level changes.

What would be the right way to deal with this?

Step 1: extract path in a loop, so that you can handle any level of folder-nesting. You don’t assume you are N levels deep, because folder-level is not something that can be assumed! Instead you traverse the path to find how deep you are.

Step 2: Back-slash? Welcome to multiple OSs! The file-separator character itself is hard-coding. In every language worth its salt that runs on multiple OSs, you have operators to find environment variables including file-path separators. On Unix/Linux you are “/”, on Windows you are “\” or “/”. On Mac you had “:” long back during MacOS, and now you have “/” on OS X with its Unix core. And then I was on some Solaris/RISC machines decades back which used “.”.

Should you hard-code assumptions about N-level nesting and separators? Absolutely not.

Does it need extra time to write flexible code? Absolutely not. The amount of time you spend later in not writing tight right code in the first place, so much of debugging and frustration and rework – it would all be avoided if it were first-time right. And to write above path-extraction code in a loop with separator detection rather than hard-coding – you are talking about couple extra minutes. Take one less leak and you can find time to do the right thing!

Is it rocket science that an average programmer cannot do? Absolutely not. Once you decide to do things like this, it is pretty easy actually.

Then why do people not do it?

Because of mediocrity. A mediocre mind is happy with sub-standard work that somehow passes through. Because of lack of involvement. When you are pushed into a “career”, you are least concerned with your quality of work. As long as the next raise comes around, who cares! You are not a craftsperson to take pride in work, you are just a code jockey.

This, ladies and gentlemen, is the difference between a good software engineer and someone who just gets things to work. A good software engineer anticipates need for change and does things first-time right. A good software engineer thinks ahead and does things in flow during first-code which take very little additional time to do. A good software engineer does not hard-code, either directly as literals or indirectly as implicit assumptions.

Someone who is just a programmer does not do any of the above, and just somehow gets things to work – never sure when it will fall apart.

Now you decide what you want to do.

 

Spread the love
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •