HOME | Blog | YouTube | LinkedIn | About Me         || Calculators    | SoftEng/Tech Posts    | Code/Scripts

Saturday, December 24, 2016

Py CPU Score

What is your Py CPU score?

You are probably asking what "Py CPU Score" is.

I am giving the following simple CPU test the name of Py CPU Score. It uses 2 lines of Python code to determine how fast your CPU is.

Python code for Py CPU Score:
import timeit
int(round(timeit.timeit('"|".join(str(i) for i in range(99999))', number=1000), 0))

This simple code can be used to measure the CPU performance of your computer in a very simple way.

Here are Py CPU Scores for some of my computers:

  • 31 sec ==> Macbook Air 13", 1.6 GHz Intel Core i5, 4Gb memory, OS X El Captain
  • 26 sec ==> Dell Inspiron 1.80 GHz, 2 cores, 8Gb memory, Windows 7 64-bit. 
  • 22 sec ==> Dell Latitude E6540, i7-4810MQ, 2.80 GHz, 16Gb memory, Windows 7 64-bit.

If you are familiar with Python code and you are wondering what this code does, here is a quick explanation:

  • It loops from 0 to 99,998 and appends these numbers to a string that has a separator. That's one unit work and it repeats this unit of work 1,000 times and it calculates how many seconds it took to perform that. 

To establish a good baseline, execute this code when your computer is not doing anything else. Depending on what type of computer you have, you may notice a significant increase in CPU utilization. If you ran around 10 of these Python scripts in parallel, your CPU could approach 100% very quickly. 

Try it out. Comment below with your score and the specs of your computer. 

Almir M.

Friday, December 16, 2016

Troubleshooting Http 504 error  in AWS — some quick tips

- Go to EC2
- scroll down to Load Balancers
- select your LB
THEN look down and SET Idle Timeout. Since ELB may pre-open connections, the timeout of 60sec may not be enough because they may expire by the time ELB tries to use the connection to get to your service.
ALSO check the KeepAliveTimeout on your web server and it should be greater than or equal to Idle Timeout on your ELB.

Almir M.
#aws #ELB #code #programming #API #RESTful 

Sunday, December 11, 2016

Should Senior Leaders be diving into technical details?

Should your senior leadership team be diving into technical details?
A lot of times people say that your thought process and idea-generating part of brain will be subconsciously limited or throttled down if you get into the low-level technical details that your job does not require. Yes, there is something to be extrapolated out of this, but this is not entirely true.
Let’s use product managers/owners as an example. Nobody should be stopping you from dreaming and coming up with requirements and direction that may not look closely feasible. That’s ok; this exercise is definitely needed and that’s how a lot of great ideas were kick-started; however, kick-starting an idea is not enough. Sometimes you are required to come up with something that is a short to mid-term dream but very feasible and in order to achieve that, as the product manager you would need to understand the low-level technical details.
The same applies to our senior leaders. As a leader you need to be occasionally diving deep, figuring things out and coaching your team, and then surfacing to the top and making executive decisions.
This reminds me a bit of the show “Under the cover boss”. It should not happen as it happens in that show, but you understand my point. The bosses that roll up their sleeves when necessary create an open culture that allows employees to relate to them better and feel more open to share the information. I have been in a number of situations when members of my senior leadership team stayed with me at work in the early morning hours helping me out in the last stretch of critical projects. I even remember the 24–30 hour shifts when we got support from leaders several levels above us. They were there to listen, to understand and provide input when needed.
Going back to the original question. Should these senior leaders be diving into technical details when necessary? There is no right or wrong answer but in my personal experience, I appreciated the technical and moral support from the senior leadership team in the 11th hour of our projects.
Almir M.

Friday, December 9, 2016

DynamoDB Costs — Provisioned per second and cost per month

As you know AWS DynamoDB tables require read and write provisioning. You need to figure out how many reads/sec and how many writes/sec each table will need and then you provision it. You should do the same thing for your GSIs.
Keep in mind the provisioning numbers are read & writes per second and the cost is calculated per month.
Here is a quick reference for the cost based on different provisioning numbers:

Almir M.

Sunday, October 30, 2016

Apple’s Touch Bar on Macbook Pro and Word Perfect 5.1 and Vim Editor commands

As you already know Apple released a touch bar for their Macbook Pro laptops. I will analyze this from a different angle and see how professional content creators could leverage this with a bit of flavor from developers’ selection of editing tool.
I am talking about Word Perfect 5.1 and its keyboard template that we all used to have back in the day. Apple’s touch bar reminds me of Word Perfect 5.1 and the ability to have context relevant shortcuts. Apple just took it to the 21st century and made the context relevant shortcuts for all the majro applications that run on Macbook Pro. They are taking their innovations for usability and accessibility in one direction that is different from the touch screen direction that others are betting on. This is going to be interesting.
I gave it a bit more thought coming from the software engineering background. I don’t necessarily use native Vim editor often, but I do use the Vim plug-in for my IDEs and for text editors that I use for note-taking purposes. The Vim mode improves my productivity and it keeps my fingers on the keyboard.
I wonder if there is a way to leverage the touch bar interface more as a proxy between the keyboard and the Mac OS applications so that Vim-style of shortcuts could be used to control the applications without reaching for the touch bar. This could be something that professional content creators may use in order to speed up their interactions and keep the fingers on the keyword all the time instead of reaching out for the touch bar or the touch screen. Let’s say you are in your Final Cut Pro application and instead of using the touch bar as they have shown in the demo, you use Vim plug in the Final Cut Pro application that would leverage the touch bar as the proxy between the keyboard and the application.
I know this would be a super niche market, but I still wanted to share with you.

Almir M.
(Solutions Architect and Leader in Software Engineering field)

Sunday, October 23, 2016

You are all programmers. Yes, you are !

Programming is a skill that most of the tech guys learned in school or some type of formal education. With a lot of material online these days, you can learn programming without going through formal courses; you just need a bit of guidance from somebody in the industry, willingness to grind through it and you are set.
So we have programmers in all the categories I mentioned above. What about the rest of people in the professional world? I am talking about your coworkers who are not qualified software developers; I am talking about your coworkers that say “I am not a techie and I don’t understand your tech magic”. I am talking about product managers from non-technical background, non-technical managers, project managers, business analysts, directors, VPs, and so on.
This group of people does not give themselves enough credit when it comes to “programming” style of thinking.
Let’s go back to the definition of programming. Here is my definition without using Wikipedia or Google as I am on a plane without WiFi connection. Programming is an act of giving a computer/someone a list of instructions that should result in something meaningful.
With that in mind, do you see how I threw in there the word “someone” and did not just use the word “computer”.
So what does this really mean?
It means that a business requirement document (written by a product manager) is a list of instructions; it is a form a program. This document would contain simple instructions but in most situations it contains flows, IF/ELSE conditions embedded in paragraphs in the form your speaking language.
Your manager/director/VP telling you (a junior developer) what they want to achieve has direct IF/ELSE conditions, but if you are a more senior employee, the instructions from your manager become more indirect which is really a form of light coaching.
So they are all programmers. They all go through a thought process that is similar to the thought process that typical programmers would go through.
I am a programmer / software engineer / software developer; however you want to call me. One thing that my teammates have heard me say is that most problems are solvable at the high-level, but even at that high-level problem solving category, you need to have that programmer’s thought process.
How many times have we all been in meetings with for example VPs (non-tech background) and they question your application/software before it is launched to production and they think of things that many developers would not think of. That’s why I say that these VPs also deserve to be part of the programmer’s club.
You are all programmers! Yes, you are, and welcome to the club :)
Almir Mustafic
Solutions Architect / Leader in Software Engineering field

Monday, September 5, 2016

API Testing with Python - my simple template - A quick update

There are different automation testing frameworks that you can pick to do your API testing. I wanted a side home project, and I decided to keep things as simple as possible and put together a very simple template using Python alone and its requests library.

It is not using the Robot framework. It is just plain Python code with the following capabilities:

  • Main program that invokes a list of test suites that individual Python modules
  • Each test suite Python file calls a list of test cases that are individual Python modules
  • Each test suite has ability to pre-load a bunch of test data before calling test cases, and then it has ability to delete the test data that was created.
  • Each test case is a Python module that does the following:
    • gets the test/input data from a JSON file
    • makes an http request (get/post/put) call to a given microservice
    • gets the expected data from a JSON file and compares to the results from http request call
    • has ability to compare the HTTP Status results, the count and the actual data.

The test cases are NOT written in Gherkin format. The test cases are just simple Python code that any IT person would be able to write. You just need a few minutes to define your input JSON, expected JSON and a few lines of Python code if you want to compare specific fields. Once you write one test case, it is very mechanical after that. I am purposely keeping it at the level where you need to write a bit of Python code for your test cases, but it is a template code. If I make more configureable then it would slowly be turning into a framework and that's exactly what I do NOT want.

I have a working POC, but I am not ready to share it yet as I want to make it more robust and more elegant. In the meantime, I can just show you an example of a simple test case that talks to a customer service to create a customer and to verify that the data is correctly created:


Stay tuned. 

Almir M.

Thursday, July 21, 2016

Coding at home while in the zone

When I code at home, I typically do it in weekend sprints. I first come up with an idea. Then I spend weeks baking that idea in my head. Then I put the design and some pseudo-code on paper. The next step is about figuring out what external libraries I would need and I spend time getting familiar with them. 
Then one weekend I basically decide, it is the time. 
That’s when I sit down in front of my computer and code the initial version of the code in a weekend sprint. Then over next few weeks, I will spend an hour here and there and try to make the code a bit cleaner so it is worthy of being used as a POC. Then after using my application/code for some time, I would start thinking about the reuse and investing time into areas that will definitely make it enterprise-worthy. Why wouldn’t it work for some companies with minor adjustments to cycles and timings?
Almir M.

Introducing new tools in pursuit for more productivity, but when ...

How many times to do you find your company introducing new tools for managing tickets, product backlogs and agile development in general? How do you know when you are actually impacting the productivity in a negative way?

Working in software engineering field for almost two decades I have seen a lot of changes in companies when it comes to tools that you use to manage your projects and tasks. Some of these disruptions are very good for your team, but when it becomes a norm every year, then they are just disruptions without anything in return. In fact they could even be worse impacting the productivity in a negative way from technical, security and compliance point of view. What do I mean by negative impact? You could have important items in the backlog that either can be lost in the transformation process or some important details (i.e. attachments) do not get migrated from one tool to another. For example a user story could have important comments and a discussion thread that does not get ported to the new tool. 

How do you gauge when these disruptions become negative? The best people to gauge this are the leaders on the floor who interact with developers and technical experts every day. If the topic of the conversations is what tools are being used instead of what cool features need to be developed for your customers, then those are signs of negative impact. If these type of conversations persist for more than 2-3 sprints, the leaders need to detect this and act to help out the team with regaining productivity. If these scenarios repeat every year due to the company changing directions, the leaders need to shield the development/technical team as much as possible because companies do go through these cyclic changes. 

Almir M.

Tuesday, June 28, 2016

Manual Testing vs. Automated Verification

It is ok to do manual testing because testing is about getting to know your application and identifying what should be automated; it requires a human factor.

Verification is what needs to be automated because it is about checking if what worked before still works.

Almir M.

Saturday, June 18, 2016

The Single Responsibility of a Microservice

The same as user stories in agile methodology, in the world of microservice architecture, we need to define microservices as following:

As a microservice A, I exist and my single responsibility is to perform X. 

This definition can be used to keep the team honest and not introduce anti-patterns :)

Almir M

#microservices #architecture #programming #coding #code #softwareengineering #softwaredevelopment 

Friday, June 10, 2016

AWS DynamoDB and limitations with GSIs (Global Secondary Indexes)

How of many of you have challenges with DynamoDB’s limit for the number of GSIs (Global Secondary Indexes)?
Let’s step back. You may be coming into the world of NoSQL relatively recently and things that we took for granted before need to be carefully analyzed now. It is not any more about how the data is stored, but it is rather about how you search that data. AWS DynamoDB has a limit of 5 global search indexes per table.
Let’s assume you have a customer-profile table in DynamoDB with the following attributes:
  • customerId (hashkey)
  • firstName
  • lastName
  • middleName
  • city
  • county
  • zipCode
  • streetName
  • streetNumber
Let’s assume you set up the following five GSIs:
  • firstName
  • lastName
  • city
  • county
  • zipCode
Let’s assume that this setup has been working for you and then you get a requirement to have ability to search by streetName. For sake of argument, let’s say your product will have this cool new feature that allows you to search other people who live on the same streetName. You don’t have any more GSIs available. What do you do?
There are three solutions that you can apply.
(1) You need to re-think how you set up your table and your indexesthat I summarized above. Instead of having an index on BOTH firstName and lastName, you can have an index for lastName only. This will work for you if you typically search on lastName and firstName together to find a specific customer. So you can end up doing a query with filter expressionson this firstName-index table where lastName is now the partition key. The filter expression would be on the firstName attribute.
(2) Stream data to RedShift and perform search on RedShift:
You can stream your table into Redshift and on the RedShift side you would define the relational structure. Once the data is in RedShift, you can perform SQL queries. The only downside with this is the latency introduced to stream data from DynamoDB into RedShift.
(3) Create a secondary table to hold name/value pairs but there is a catch:
You could create a secondary or child table to hold a lot of information that you would search on and this table would basically have a parentId from the master table and Name, Value pair generic attributes. So for every record in the master customer-profile table, you will have X number of items (rows) in the secondary table because all other values are stored vertically in this secondary table. This means that for every write into the main customer-profile table, you have to do X more writes in the secondary table. DynamoDB should be able to handle this and the search should be efficient, but the COST will increase due to increased number of reads/writes. As long as you can afford that extra cost, and this adds a lot of business value, then you are on the right path.
I hope this gives you some ideas. You can follow me here (almirsCorner.com) and I also blog on Medium.com/@almirx101 
Almir M.

Monday, May 23, 2016

POC in HTML/NodeJS, Java microservices — what I have done to engage better with my product team and consumers of our microservices

My team and I have been working on an important strategic project in our company. We are trying to improve our agility and in the process of doing that, it is important that our product team gets to see their own product in action before we end up spending multiple iterations developing it.
Sometimes you find yourself developing a microservice that is used in the overall design and then you realize that you really need to meet with the teammates who are going to consume your microservices. You need to agree on the APIs (request / response). Agreeing on these APIs is valuable to our UI developers and possibly developers of other microservices that may consume my microservice, but it does not really give a good live representation of the overall product to product management teammates after 1st or 2nd sprint. My goal was to have a journey working from A to Z in the first sprint.
What I decided to do is the following:
(1) Picked the most important customer journey.
(2) Created a diagram of this customer journey and annotated the diagram explaining what microservices would be called at what point in the journey. Keep in mind that this is all based on my initial thinking. I know that the design was not perfect. However, no project was successfully delivered without the original design and no project was delivered by the original design. Having that initial design is very important for having more productive conversations when you walk into a room with a lot of smart developers.
(3) Coded three core microservices to be functional without hard-coding and with the actual database backend. I also put together a stubbed version of some peripheral microservices.
(4) Dashboard/Programmer’s Page: I coded a simple HTML page (hosted by NodeJS) that uses Javascript to make AJAX calls to all microservices to fetch the data from all the tables and to display in somewhat presentable fashion. It is a more presentable version of your data than directly accessing the database in your demo.
(5) POC Website to represent a customer journey: This is a list of HTML pages hosted by NodeJS. These HTML pages are very simple pages but very functional as per the mockups provided. These pages are functional to the degree that they do call the POC versions of microservices and make the journey very interactive without using any hard-coded information.
The goal was to have this overall POC be used by product owners so they can provide good feedback and that feedback can be added to subsequent sprints. By building this POC, we already achieved one goal and that is our initial design which will evolve in future sprints. In the process of developing this overall POC, I learned so much about what I want in these microservices and it helped me define the initial version of the data structure for each microservice and the initial version of the business logic needed to support the customer journey that I picked. Yes, this design will need to evolve and improve.
I kind of coded most of this in my personal time during the first sprint because I thought it would help out the team a lot. What I would like to see in future projects is that this approach becomes the definition/standard/guideline for every sprint #1.
Almir M.

Saturday, May 21, 2016

Your car’s character changing with a simple modification

I currently drive a 2008 Honda Fit (aka GD3 chassis). It has a 5-speed manual transmission and a 1.5L engine that can be very lively when pushed. Over the years, I worked out a typical formula that I like to apply as soon as I buy a car. 
That formula consists of:
  • * suspensions modifications to make the handling fun
  • * cat-back exhaust modification
  • * lightweight wheels
  • * summer performance tires
  • * possibly an air intake system depending on what car I get
In a nutshell, they are all very functional changes. These type of changes turn an economical car into a fun car that puts a smile on my face every time I drive it. I spend on average 1h 30min every day in my car so I choose to make it fun for me. Everybody is different and everybody defines “fun” for their cars differently. You may be into horsepower and I totally respect that; you may be into stance look and I also respect that.
I am slowly getting to my point. The changes above are what I consider standard modifications that absolutely change and the character of your car and that’s what we expect.
However, there are changes that I would never consider as character-changing modifications and yet they are. I am talking about very simple and cheap changes. No, it is not that “10+ HP” sticker even though that’s sometimes fun to do because my low-power Fit needs it :)
I am specifically talking about a shift knob change and a shift lever extension modification. I started with an aftermarket Karcepts shift knob that made the gear shifting a pleasure because of the added weight in this shift knob. The weight of the shift knob just makes the lever fall into the right gear with more confidence. The second type of character-changing modification is the shift lever extension. I recently purchased a 3" shift lever extension for my Honda Fit. After a quick installation I could not believe how much it changed the character of my car. This meant that the shift knob is closer to my steering wheel and when doing canyon drives, it means that I could use both hands on the steering wheel and have the shift knob in close distance for more confident gear changes. So this modification gave me that “rally racing” feel. To some degree, having this taller shift lever gave me a feel as if I am driving some old school Porsche and I am a big fan of 1960s, 1970s and 1980s Porsches.
So what I ended up doing is alternating between the short shifter and the shifter with this extension and it totally changes the character of my car with a 2-minute swap. That’s the advantage of having a manual transmission.
These are the small things that keep me happy. What is the simple modification on your car that puts a smile on your face every time you drive your car?
Almir M (almirsCorner.com)

Thursday, April 14, 2016

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

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:

Almir M.

#Linux #bash #scripts #environmentvariables #programming #code #coding

Saturday, March 12, 2016

Kids & Information Security - Fun Introduction

Teaching kids about information security is very important today because the social network websites and applications are blurring the line between what should be shared securely and what not.

Everybody is busy over-sharing the good, bad and ugly over the internet and in the process of doing that forgetting the basics of information security or never taking the time to learn it. Or is it that nobody is introducing these concepts in school? It is something that needs to be introduced in our education systems from early days.

Do you remember the days when we used to send those short messages on a piece of paper in our classrooms? Some encoded those messages because you did not want another person in the middle to open it and understand what it says. How were those messages encoded?

The simplest example is: You create a simple mapping for each letter and number in the alphabet. Then you encode your message and write it on a piece of paper. Then the person on the other end decodes this message knowing the mapping because you shared it with them secretly.

Here is an example of mapping:

Separator between characters is ;;;
A is 0
B is 1
C is 2
D is 3
E is 4
a is 100
b is 101

Then if you want to encode "Do you want to play tennis tonight?", you would write the following:


The person on the other side would be able to translate this message into English as long as you previously shared the mapping with him/her. Obviously with the technology these days you would not be using paper and translating this; you would be using a software tool. I quickly put together an example in a simple web page using Javascript where you can plug in some sentences and it will use the exact same mapping as I explained above.

Try it out: HTML page where you can try this

The example above is a very simple mapping. If you want to use a slightly more complicated mapping, here is another example:

Try it out: Encoding/Decoding example in Javascript

The above algorithms for encoding/decoding are simple and can be figured out by experts very easily but they are relatively complex for novice and average computer users. These examples are just a way of introducing these concepts and encouraging you to teach your kids the importance of security.

These examples are easy to try and have some fun with them. You can save those examples as HTML files on your local computer, then edit the file and change the mapping at the top of file to what you want. Then in some secure way share that HTML file with your friend. From that point, you can send encoded messages to your friend in an email. The receiver can decode the message by copying and pasting the message into this simple HTML page and decoding it :)

Let's use this opportunity to do a quick security gauge of your security habits and if you have kids/nieces/nephews, teach them. Here are few comments/questions for you:

  • If you are using the same password across multiple accounts, you should change this.
  • If your passwords have names of cities, countries, or any word that you can find in a dictionary, you need to change this habit very soon.
  • If your passwords are not long enough and complex enough, then you need to do something about this. Details on what "long enough" and "complex enough" can be found on internet and the best way to deal with this is to use well respected tools for this. 
  • Are you using two-factor authentication for any accounts that support this?

Almir M.

#InfoSec #encoding #decoding #programming #programmer #code #coding #software #softwaredevelopment #InformationSecurity #SecureCommunication 

Friday, March 11, 2016

Horsepower per Weight Calculator - Really?

There is saying “Horsepower is what sells cars”. That is mostly true. This blog post is about pointing out another factor that is important in determining what the horsepower number really means. If you are a car enthusiast, then you are probably bored by this post, but even we car enthusiasts need to be occasionally reminded about it.
Here is the link to this simple calculator and my explanation is below:
The horsepower number tells you how powerful the engine of that car is. It does NOT tell you how fast that engine can move the car. This is where you need to look at the overall weight of your car. The laws of physics cannot be broken. If object A is heavier than object B, then you will be slower running with object A in your backpack. The same rules apply to cars.
Let’s look at one example. My 2008 Honda Fit has a 1.5L engine producing 109hp and it weighs 2465 LB. 2016 Honda HR-V has a 1.8L engine producing around 141hp and it weighs 2888 LB. If you calculate power-to-weight ratio and you use the Honda Fit as the BASE, then Honda Fit stays at 109hp and Honda HR-V ends up being 120hp. So when Honda HR-V is compared to Honda Fit, it does NOT really have 141hp; it has 120hp. This is how I like to compare cars; I use my current car as the baseline.
Another way to approach this is by calculating Weight/Horsepower ratio. Keep in mind that smaller number is better.
This is not a deciding factor but it could be one of factors for some of us. At the end of the day, nothing replaces a test-drive and the X-factor of a given car without looking at any calculations. For example, based on my list below, my car has the top 2% worst ratio, but I still have a big smile on my face as the power is not a deciding factor for me. However, I might be an exception.
Here is the list of WEIGHT/HORSEPOWER ratios of some cars for your reference. Keep in mind that smaller number is better.
  • 22.6 lb/hp (2008 Honda Fit LX) …..my current car :)
  • 16.9 lb/hp (2016 Acura TLX, 2.4 AUTO)
  • 14.4 lb/hp (2016 Acura MDX SH-AWD)
  • 16.6 lb/hp (2016 Audi A4 2.0T quattro)
  • 11.6 lb/hp (2016 Audi S4)
  • 8.9 lb/hp (2015 Audi RS5)
  • 7.1 lb/hp (2015 Audi R8 V10)
  • 13.8 lb/hp (2016 BMW 328)
  • 16.5 lb/hp (2016 BMW i3)
  • 9.7 lb/hp (2016 BMW i8)
  • 7.2 lb/hp (2016 Chevrolet Corvette Stingray 1LT)
  • 11.0 lb/hp (2015 Dodge Challenger R/T)
  • 5.8 lb/hp (2015 Ferrari 458 Italia)
  • 23.4 lb/hp (2016 Fiat 500)
  • 8.5 lb/hp (2016 Ford Mustang GT)
  • 19.3 lb/hp (2016 Honda Fit LX)
  • 20.5 lb/hp (2016 Honda HR-V LX)
  • 17.7 lb/hp (2016 Honda Civic EX CVT 2.0L)
  • 16.7 lb/hp (2016 Honda Civic EX-T CVT 1.5L Turbocharged)
  • 17.8 lb/hp (2016 Honda Accord Sport CVT, 2.4L 189hp)
  • 14.6 lb/hp (2016 Honda Pilot EX 2WD)
  • 12.1 lb/hp (2009 Honda S2000)
  • 5.6 lb/hp (2014 Lamborghini Gallardo LP-560 AWD)
  • 8.5 lb/hp (2016 Lexus RC-F)
  • 10.5 lb/hp (2011 Lotus Elise Base)
  • 15.0 lb/hp (2016 Mazda MX-5 …Miata)
  • 19.6 lb/hp (2016 Mini Cooper Base)
  • 14.7 lb/hp (2016 Mini Cooper S)
  • 7.2 lb/hp (2016 Nissan GT-R)
  • 7.7 lb/hp (2016 Porsche Carrera S)
  • 6.3 lb/hp (2016 Porsche Carrera Turbo S)
  • 6.3 lb/hp (2016 Porsche GT3 RS)
  • 7.7 lb/hp (2016 Porsche Cayman GT4)
  • 10.0 lb/hp (2016 Tesla Model S P90D AWD, 463hp)
  • 25.4 lb/hp (2016 Toyota Prius Two …..121hp)
  • 18.2 lb/hp (2016 Toyota Camry LE)
  • 15.6 lb/hp (2014 VW GTI)

Almir M. (almirsCorner.com)
#cars #horsepower #lightweight #racing