Hussein Nasser's Blog, page 3
October 31, 2018
A tale of a software engineer - you vs. them
ThemThey write front-end apps hitting REST endpoints sitting on your server. They were tasked to show unique values in a drop-down list in the app.
They use a client library for their favorite language which calls your REST endpoints. There was no queryUnique method the library, so they ask the developer maintaining the library to add the method.
The developer maintaining the library, The developer adds a new method queryUnique, which turns around and calls query with returnUnique boolean as clearly stated in your REST doc.
YouYou are the backend engineer. You maintain and tune the REST API, the server, the networking, and the database.
They write front-end apps hitting REST endpoints sitting on your server. One of their apps performs badly when retrieving unique values. You get to work.
You intercept the query in the database and you notice that their app is doing a full-table scan retrieving all rows and all from a table which has a million row.
"Why are they pulling all rows from the table, that is stupid." You said
Intervention"The app is doing a full table scan retrieving all rows that is why it taking a long time." You said confidently. "What are you trying to do?"
"That doesn't sound right", They said. "I mean we added a new method that returns unique rows for a column."
"What a bunch of tools", You said to yourself. "Are you doing the filtering in the client? you really shouldn't, you should use returnUnique parameter in the REST API"
"That's what we used, here is the code." Said the library developer proudly showing his code.
"That looks .. right.." You said after a nervous pause.
To be continued...
They use a client library for their favorite language which calls your REST endpoints. There was no queryUnique method the library, so they ask the developer maintaining the library to add the method.
The developer maintaining the library, The developer adds a new method queryUnique, which turns around and calls query with returnUnique boolean as clearly stated in your REST doc.
YouYou are the backend engineer. You maintain and tune the REST API, the server, the networking, and the database.
They write front-end apps hitting REST endpoints sitting on your server. One of their apps performs badly when retrieving unique values. You get to work.
You intercept the query in the database and you notice that their app is doing a full-table scan retrieving all rows and all from a table which has a million row.
"Why are they pulling all rows from the table, that is stupid." You said
Intervention"The app is doing a full table scan retrieving all rows that is why it taking a long time." You said confidently. "What are you trying to do?"
"That doesn't sound right", They said. "I mean we added a new method that returns unique rows for a column."
"What a bunch of tools", You said to yourself. "Are you doing the filtering in the client? you really shouldn't, you should use returnUnique parameter in the REST API"
"That's what we used, here is the code." Said the library developer proudly showing his code.
"That looks .. right.." You said after a nervous pause.
To be continued...
Published on October 31, 2018 07:03
October 25, 2018
Announcing my Podcast
PodcastIf you are interested in GIS and Software Engineering, you will enjoy my podcast. Check it out!
Published on October 25, 2018 21:24
October 6, 2018
Product Architect vs Solutions Architect
In this episode of #softwaretalk, we discuss the differences between the software product architect and a solutions architect. We start by defining the difference between a software product and a solution. Then we discuss the responsibilities of product architect vs solution architect.
If you are interested to be a solution or product architect or engineer you came to the right place.
Cheers
Hussein
If you are interested to be a solution or product architect or engineer you came to the right place.
Cheers
Hussein
Published on October 06, 2018 07:21
October 5, 2018
Reverse Engineering Twitter
This is our reverse engineering series where we pick a mainstream app and try to understand how the developers built it, how the APIs are designed on the backend and how the front-end user experience is designed for performance, efficiency and business decisions. We can become better software engineers by learning how the likes of Google, Facebook, and Twitter are building APIs and user experiences. Obviously, I might make a mistake here and there but that is part of the fun! In this episode, we try to reverse engineer the Twitter feed. We discuss how the IOS Twitter App is doing efficient thumbnail caching and insane client queuing of tweets, likes and retweets actions. Enjoy!
Enjoy!
Hussein
Enjoy!
Hussein
Published on October 05, 2018 11:39
October 4, 2018
#Geodatabase Talk - Episode 9 - SDE (Spatial Database Engine)
The #geodatabase is a technology developed by #Esri that abstracts the underlying storage medium into another layer. By doing that you get interesting functionalities like domains, feature classes, tables, feature datasets across multiple databases from file based to enterprise RDBMS like Oracle, PostgreSQL, SQLServer DB2 etc. The communication between the client and the enterprise geodatabase is done through the spatial database engine. We explain that layer in this episode.
Boost your GIS knowledge by grabbing my books ——————————————————————— - [x] Learning ArcGIS Geodatabase https://goo.gl/csQdCX- [x] Administering ArcGIS for Server https://goo.gl/zvYCRg- [x] ArcGIS By Example https://goo.gl/yJKSqB- [x] Building Web Applications with ArcGIS https://goo.gl/brgKUJ Watch my top GIS videos ———————————— - [x] Support IGeometry on paypal: https://goo.gl/wZ8hSh- [x] Full ArcGIS Javascript API Series Playlist http://bit.ly/2zf7G80- [x] Full Multi-User Geodatabase Playlist https://goo.gl/nSgYnM- [x] Full ArcGIS Pro 2.x Playlist https://goo.gl/2j4NoZ- [x] Full ArcGIS By Example (C#) [Phonatech] Playlist https://goo.gl/FwdrHa- [x] Full ArcGIS Server Playlist https://goo.gl/nkfM6Q
Boost your GIS knowledge by grabbing my books ——————————————————————— - [x] Learning ArcGIS Geodatabase https://goo.gl/csQdCX- [x] Administering ArcGIS for Server https://goo.gl/zvYCRg- [x] ArcGIS By Example https://goo.gl/yJKSqB- [x] Building Web Applications with ArcGIS https://goo.gl/brgKUJ Watch my top GIS videos ———————————— - [x] Support IGeometry on paypal: https://goo.gl/wZ8hSh- [x] Full ArcGIS Javascript API Series Playlist http://bit.ly/2zf7G80- [x] Full Multi-User Geodatabase Playlist https://goo.gl/nSgYnM- [x] Full ArcGIS Pro 2.x Playlist https://goo.gl/2j4NoZ- [x] Full ArcGIS By Example (C#) [Phonatech] Playlist https://goo.gl/FwdrHa- [x] Full ArcGIS Server Playlist https://goo.gl/nkfM6Q
Published on October 04, 2018 11:37
October 1, 2018
Is Coding Easy?
Welcome to the first episode of software engineering talk. This series we pick a topic and casually talk about it. In today’s episode, we try to answer the question is Coding easy?
Intro: 0:00Easy vs. Simple 3:20Building a profile page example: 3:55Database Level challenges: 6:00Database Indexes: 8:00SELECT * FROM: 8:55Be Empathic of all software actors: 10:20
Cheers!Hussein Nasser
Intro: 0:00Easy vs. Simple 3:20Building a profile page example: 3:55Database Level challenges: 6:00Database Indexes: 8:00SELECT * FROM: 8:55Be Empathic of all software actors: 10:20
Cheers!Hussein Nasser
Published on October 01, 2018 11:59
September 30, 2018
How to become a Better Software Engineer?
There is no secret, no magic potion, no pill or book or a “new” programming language that will make you a better software engineer. To be a better software engineer you have to write more software. Write silly software, write fart software, write stupid software, write bad performant software. Write enough software to give the edge to be better than other software engineers and software developers.
Enjoy the video!
Hussein
Enjoy the video!
Hussein
Published on September 30, 2018 11:57
September 9, 2018
MIME sniffing (Explained by Example)
Any content that is served through HTTP web “should” include meta data about its type. This is so the browser/client knows what to do with it, if the content type header is an image it will preview it, if it is HTML it will render it and execute any javascript code.
Content type however is optional and web masters sometimes don’t set it, which leave the browsers wondering about the content type it is consuming. So browsers started consuming the actual content and parse it in order to detect the type.
However, this caused security concerns that we explain in this video! So to prevent sniffing, web servers can return X-Content-Type-Options: nosniff which opts out browsers from sniffing the content.
Media types: https://en.wikipedia.org/wiki/Media_type#Common_examples
Content type however is optional and web masters sometimes don’t set it, which leave the browsers wondering about the content type it is consuming. So browsers started consuming the actual content and parse it in order to detect the type.
However, this caused security concerns that we explain in this video! So to prevent sniffing, web servers can return X-Content-Type-Options: nosniff which opts out browsers from sniffing the content.
Media types: https://en.wikipedia.org/wiki/Media_type#Common_examples
Published on September 09, 2018 08:51
September 6, 2018
Administering ArcGIS for Server by Hussein Nasser
ArcGIS for Server is a new technology that has been developed to bring geographically-enabled information from multiple sources into one single platform and make it available for sharing services. Server supports many types of services, and the beauty of this technology is that it has an edge over other products, as the source of information can be directly plugged into Server without the need to change or migrate the existing infrastructure.Administering ArcGIS for Server teaches you the mechanics of ArcGIS for Server, equipping you with the skills to not only install and configure Server, but to do it efficiently to achieve effective results. You will also learn how to plan, analyze, design, and finally publish and consume GIS services from various platforms including mobile and tablets.We start by installing Server and authoring and consuming GIS services. We then move on to planning services before showing you how to optimize, secure, and debug them.One of the hot topics in this book is the optimizing of GIS services, which will help you manage resources efficiently. You will also learn how to apply multiple security mechanisms on ArcGIS for Server and safely expose the services to the public in a secure manner.Administering ArcGIS for Server will help you prepare a robust Server infrastructure for your organization.
Thank you guys for buying my book! Enjoy it and check out my 200+ free video tutorials on IGeometry YouTube channel.
Published on September 06, 2018 20:54
Building Web Applications with ArcGIS Javascript 3.x Book by Hussein Nasser
ArcGIS allows users to create rich maps and applications that interact with services hosted on ArcGIS for Server and ArcGIS Online. This book will help you to understand the ArcGIS JavaScript API in a fun way while building a real-life project.This book revolves around a fictional project called Bestaurants. The journey starts with a description of the project requirements before moving on to designing and sketching an interface of what the website will look like. Then, gradually with each chapter, you will add a single functionality until the full ArcGIS application is completed.By the end of this book, you will have built an entire ArcGIS web application from scratch. An additional bonus appendix is included on how to build ArcGIS applications with ArcGIS Online–a new and extremely useful service offered by Esri.
Thank you guys for buying my book! Enjoy it and check out my 200+ free video tutorials on IGeometry YouTube channel.
Published on September 06, 2018 20:47


