Snippet of code that reads XML, encodes it, and returns a dictionary within my API-test framework:
Almir M.
#python #code #coding #programming
Wednesday, February 22, 2017
Snippet of Python code reading CSV file into a dictionary
Snippet of Python code reading CSV file into a dictionary.
Almir M.
#python #code #programming #coding #softwaredevelopment #csv
Almir M.
#python #code #programming #coding #softwaredevelopment #csv
Generate random alpha string and UUID. Snippet of Python code
Generate random alpha string and UUID. Snippet of Python code.
random_word function is very useful if you for example need to create first name or last name for some automated tests.
Almir M.
#python #programming #code #coding #softwaredevelopment #UUID #random
random_word function is very useful if you for example need to create first name or last name for some automated tests.
Almir M.
#python #programming #code #coding #softwaredevelopment #UUID #random
Getting DynamoDB item by partition and SORT key using Python
Getting DynamoDB item by partition and SORT key using Python. Snippet of code.
Almir M.
#coding #programming #softwaredevelopment #AWS #NoSQL #Python #code #DynamoDB
Almir M.
#coding #programming #softwaredevelopment #AWS #NoSQL #Python #code #DynamoDB
Getting DynamoDB item by partition key using Python
Getting #DynamoDB item by partition key using #Python. Snippet of code.
Almir M.
#code. #coding #programming #softwaredevelopment #database #NoSQL #python #DynamoDB
Almir M.
#code. #coding #programming #softwaredevelopment #database #NoSQL #python #DynamoDB
Readme file explaining simple order of steps for building docker image
Readme file explaining simple order of steps for building docker image.
Almir M.
#docker #programming #code #coding #softwaredevelopment
Almir M.
#docker #programming #code #coding #softwaredevelopment
Quickly test your CPU with this small Python code
Quickly test your CPU with this small #Python code.
Almir M.
#code #programming #coding #softwaredevelopment #CPU
Almir M.
#code #programming #coding #softwaredevelopment #CPU
Snippet of code from my Python module doing requests.put call to a microservice
Snippet from my Python module doing requests.put call to a microservice.
Almir M.
#Python #code #RESTful #microservices #API #programming #HTTPRequest
Almir M.
#Python #code #RESTful #microservices #API #programming #HTTPRequest
Snippet of Python code to measure the execution time
Snippet of Python code to measure the execution time.
Almir M.
#code #coding #programming #datetime #softwaredevelopment
Almir M.
#code #coding #programming #datetime #softwaredevelopment
DynamoDB Series - Things you will not learn in regular tutorials - Case Sensitivity of values and how you would query the table
When it comes to DynamoDB tables, there are certain things that you need to consider if you plan to search on fields and you don't want it case sensitive.
Here is my YouTube video that describes this:
Almir M.
#aws #amazon #dynamodb #database #nosql #programming #code #coding #softwaredevelopment
Saturday, January 21, 2017
Use of var in C# -- We need to have some discipline
As C# language evolves, programmers need to have the discipline and keep the code as elegant as possible. Some new capabilities with "var" declaration could make the code less readable if you don't follow simple guidelines.
Here are a few examples with comments showing what is good and what is bad practice:
Almir M.
#Csharp #DotNet #programming #code #coding #SoftwareDevelopment #SoftwareEngineering
Here are a few examples with comments showing what is good and what is bad practice:
var customerInfo = RetrieveCustomerInfo(customerId); // Bad, not readable
CustomerInfo customerInfo = RetrieveCustomerInfo(customerId); //Good
var settings = GetInboxSettings(); // Bad, not readable
InboxSettings settings = GetInboxSettings(); // Good
Dictionary<string, List<string>> myDictionary = new Dictionary<string, List<string>>(); // redundant
var myDictionary = new Dictionary<string, List<string>>(); // OK
Almir M.
#Csharp #DotNet #programming #code #coding #SoftwareDevelopment #SoftwareEngineering
Thursday, January 19, 2017
Generate a random word in Python
In order to keep uniqueness of records in some of your tests, you may have a need to generate a random word (alpha ONLY). Here is a Python function to achieve this:
For example, I am using this to randomize first and last name in the JSON block before I pass this JSON as payload to an API that tests Customers microservice.
Almir M.
Friday, January 13, 2017
Delivering on time — it is a skill of knowing when to slow down
Delivering projects / initiatives on time is a skill of knowing when to step on the brakes, slow down, and clean up things and make it production worthy.
If you are sprinting trying to get more feature squeezed in all the way until the finish line, then you don’t have time to slow down, polish up things and launch; oops, you just ran over the line.
Yes, if you slow down, you will deliver fewer features, but you WILL deliver a defined business value on time. What is an alternative?
My above statements obviously have different meanings within the waterfall vs. agile development methodologies, but the overall essence is the same.
Almir M.
Monday, January 2, 2017
Python Modules - Simple Example
I have written a lot of Python code in last year or so, but I realized that I have not been doing the modules and the import of modules properly. I have been concentrating mostly on the logic of my applications and I have ignored the distribution part of the modules and these applications. Yes, my applications have been mostly POCs for my team and some tools, but these still deserve to be implemented to enterprise standards.
There is a lot of material on internet about Python modules, but it takes time to conclude what the simplest way is. I spend last few days doing some research and trying out things until I arrived at something simple and what I believe could be used at the enterprise level.
I am in the process of learning this and I decided to document it for others with very simple examples that you can download and try yourself.
Click HERE to download the code from my Google Drive.
Below are the screenshots of the code structure. You will see that there are two modules that are bundled under one module_util:
NOTE:
My next post will be about making some additions in this code to make this code distributed in the form of Python eggs.
Then the post after that will about using this Python egg in a different application as a black box.
Almir M.
There is a lot of material on internet about Python modules, but it takes time to conclude what the simplest way is. I spend last few days doing some research and trying out things until I arrived at something simple and what I believe could be used at the enterprise level.
I am in the process of learning this and I decided to document it for others with very simple examples that you can download and try yourself.
Click HERE to download the code from my Google Drive.
Below are the screenshots of the code structure. You will see that there are two modules that are bundled under one module_util:
- util_general
- util_math
To make the example more realistic, the util_math module using code from util_general module.
The code in main.py shows you you can properly import the modules and use the functions from these modules.
NOTE:
My next post will be about making some additions in this code to make this code distributed in the form of Python eggs.
Then the post after that will about using this Python egg in a different application as a black box.
Almir M.
Subscribe to:
Posts (Atom)














