Skip to main content

Posts

Showing posts from September, 2017

Linux Tip of the Day — Environment variables, bash script execution in the context of your command-line window

I had to remind myself about this as I worked on Unix/Linux platform a long time ago and having been in Microsoft shops for many years did not help either :) If you want your environment variables (being set up by another script) to be properly set up in the context of the window where you are running the script, you have to  run the script with a dot and a space in front of it  as shown in the screenshots below. Screenshot of vim editor showing you the content of setup.sh script: Executing the script in bash window and then verifying if an environment variable is set up: Thank you for reading. Almir Mustafic

Teaching Kids the Concepts of Programming — How important is this?

Code kids? Let me start by saying that I was NOT a code kid. Generally speaking a code kid is a kid that starts programming at early age and by early age, I am talking about 6 to 12 years old. I was good in math and science, but the first time I was exposed to programming was in grade 8 which is considered late by code-kid standards :) In grade 8, I was writing code on paper and asking one of my friends to borrow his Commodore-64 to see what it runs. I was excited to see my first for-loop working. When I really got into it, I was in grade 11 and 12. I enjoyed it and I have been deep in this world ever since. There is a level of satisfaction that programmers get when they figure out a problem after hours of troubleshooting. It is hard to explain until you experience, and you also can experience it. Does every kid need to end up working as a software developer? No, they don’t, but being introduced to programming in early days is very important for exposing kids to different type

Healthy To Learn Something Outside Your Box

When you have a problem to solve, what is the most typical way to approach it? Everybody is different, but most of us try to stay within our comfort zone because that’s what makes us feel more stable or more secure. We have one tool and we try to solve all the problems with that tool. When it comes to providing software solutions, you have to step a bit out of that comfort zone in order to innovate and in order to provide flexibility for someone else to innovate. I started my career in Unix/C++ software engineering world years ago. Then I switched to a Microsoft shop at the end of 90s. I’ve been in the Microsoft world ever since, but I’ve shown a bit of interest in other technologies that are from the open-source community. In last few years I started digging deeper into Python, Node.js, and recently back in Java area. I have not been doing this because I am unhappy with what Microsoft had to offer, but I am rather doing it because I want to explore and find out how the open-sou

Challenge the person that tells you “We don’t really do agile here”

How many times did you hear somebody say “ We don’t really do agile here ”. What does that even mean? First, the word “agile” is not a noun and you can’t do “agile”. We all forget this and we all get caught using the word “agile” as a noun. The Agile Manifesto is very good, and how some of the organizations that promote scrum approach interpreted that manifesto is just one way of looking at it. I understand why these organizations worked on converting the word “agile” from adjective to a noun. It is because you can sell nouns and you can’t sell adjectives. Think about the overall industry that is built around training people on agile methodologies and all the certifications. I have nothing against these organizations writing books and providing courses on this matter. That is all good. I encourage everybody to learn and get exposed to different types of opinions and interpretations. You can treat all that available material on agile methodology as case studies. We all know that

Self-Organizing Team — Is this possible? What happens to the tech lead role?

Teams ,  tech   leads ,  self - organization  and  responsibilities  are some of the keywords that I will use this in blog post. Most of this article is wishful thinking on my side, but I am being optimistic . Let me first ease into this topic by talking about the role of tech leads in the software engineering field. Be patient with me as this is all directly related to the main topic. I believe that the role of good tech leads is very often underestimated or taken for granted until they are removed from the equation and then you start realizing how much work goes into it. While the role of tech-lead is kind of stuck in between keeping project/program managers happy and working on low-level technical details, there are what I call unofficial/unwritten benefits of being a tech lead. You are in that special position as a leader where you are closest to all the activities on the floor and you can shape and improve things unofficially even though there are different rules and percep

Python Programming Series — Factory Pattern - One Example

I have been doing software development for 18+ years, but I am relatively new to the open-source community. I learned a bit of  Python  back in 2013 and I put it on hold because I was not thrilled with the syntax and code readability as I am used to strongly-typed languages, and I just picked it up again because as I am going through some AWS training and AWS CloudFormation. If you are a Python expert, you should not be on this page :) As I am revisiting Python as a programming language, I figured I would post things as I am learning and putting together examples. That’s the point of this series. DETAILS ON THIS EXAMPLE ARE HERE: http://almirscorner.blogspot.com/p/python-factory-pattern-example.html Almir Mustafic

Winging it — People who master it make you believe that they are following its definition

What does “winging it” mean? We all have done it, but do we master it? Definition : To  wing it  is an idiom that means to improvise, to do something without proper preparation or time to rehearse. People often talk about winging it when they have to do something difficult that they didn’t have time to prepare — like a make speech or give a presentation. Those who are regularly successful in it are actually memorizing their speeches and the facts from the speech. They practice and practice. Then when the actual meeting or speech or presentation comes, they have the confidence because in the worst case, you memorized everything and you can go by the script. With that confidence, you find opportunities during your presentation to be more natural and that natural behavior keeps your audience engaged; some may say that you are winging it and that you are very good in it but I call it “being very prepared”. Don’t think that this only applies to your senior management team. This a

POST Desktop Era — Are we there?

Back in 90s when I worked at IBM, I used to use dumb terminals connected to Unix servers that had some amazing specifications. Then we went into the direction of having powerful desktop computers and powerful laptops. With the introduction of Chromebooks (with ChromeOS), we are back to those dumb terminal days but still at the infancy phase. With Chromebooks, you can be almost 100% productive if you are not in IT industry, but when it comes to IT professionals, we are slowly getting there. More and more tools are becoming available online through web browsers. One of those tools is Cloud 9 IDE that I have used for software development. I can do Linux commands/scripts, Node.js, Javascript, HTML5, and Python programming all through my browser on my Chromebook. Yes, I have my IDEs for my Windows and Macbook machines, but there is something fun about developing in a cloud IDE. Maybe it is just the nerd side of me. The message in the above image is what I saw one day when my Cloud

Programming / Software Engineering  — Think Paper, Paper, then Code

Most of the software engineering problems are solved in what I call the high-level brainstorming sessions. We basically walk into a meeting room and white-board our thoughts and come up with solutions. When things start falling apart, you better believe this happens in the last stretch of projects and it does work.  Now the issue is that we as programmers do NOT do the similar type of exercise before a line of code is written ? I typically see developers get requirements in the form of a document or a user story or in the form of walk-by requirements. The next thing I see on developers’ screens is code editors or IDEs. Is that the right thing to do? You may say that you are advanced enough and that you like to dive into coding right away, but this happens even to the best of us. We fall into this trap and rarely step back and review our habits. We have to go back to fundamentals. What did we do in school?  Professors taught us to write down our thoughts and to show what we plan

Great coder != Great software engineer

Great coder != Great software engineer How do you change that sign into an “=” sign? As a software engineer out of college, your initial goals are to get use to the professional working environment. Once you get passed that first hurdle, then it is all about the programming or coding skills. You want to improve your .NET C# skills or Java skills or NodeJS skills or Python skills or database skills. You want to learn the frameworks around these programming languages better and you want to learn different ways to optimize your code and apply different design patterns in your implementations. These are great skills to have and in a lot of cases required skills to have. The most important thing is that you are enjoying what you are doing. At this point you have reached that level that will give you the right to label yourself as a great coder or a great programmer. However, there is still more to go. At this time your main focus is programming and you may be lucky that your tech

Python Programming Series  -- Read a file and write into another file

If you are trying to get started in Python, here is a good example for reading a file and writing results into another file. This Python program reads a file, searches for a specific keyword and writes the matched lines into another file. #!/usr/bin/python def main (): myfile = open ( 'file-textexample.txt' ) myoutput_file = open ( "file-read-write-output.txt" , "w" ) for str_line in myfile: if str_line.find( 'Error' ) > - 1 : print (str_line) myoutput_file.write(str_line + " \n " ) # write to another file else : print ( "." ) # close both files myoutput_file.close() myfile.close() if __name__ == "__main__" : main() Thank you for reading this article.  Almir Mustafic

Python - String manipulation

To learn basic string manipulations in Python, you can try the examples below. I hope you find this useful. Reminder: If you are an expert in Python then you can skip over article and still stay tuned for more articles on software engineering. strings-example.py ___________________________________________________ #!/usr/bin/python def main (): s = 'this is a string' print (s.capitalize()) print (s.title()) print (s.upper()) print (s.swapcase()) print (s.find( 'is' )) print (s.replace( 'this' , 'that' )) print (s.strip()) print (s.isalnum()) print (s.isalpha()) print (s.isdigit()) print (s.startswith( "this" )) pos = s.find( 'str' , 1 , 15 ) if pos == - 1 : print ( "did NOT find it" ) elif pos == 10 : print ( "found it at 10" ) else : print ( "found it" ) print ( "++++++++++++++++++++++++" )