[{"content":"TLDR;\nIn this post I show how to simulate Azure IoT device D2C (Device to cloud) messages telemetry, and Device Twin Reported Properties using MQTTX CLI.\nIntroduction I have been working in several Azure IoT projects in the past 3 years, where MQTT was the preferred device/server communication protocol. In these projects, there has been a repeatable need to generate MQTT messages to simulate devices\u0026rsquo; telemetry, without going through the Azure CLI.\nOne of the tools that I found recently was MQTTX CLI, which is a light-weight client that can subscribe to and publish topics to MQTT broker, and has a solid and dynamic templating functionality based on JavaScript that makes generating telemetry easy.\nQuoting from their website:\n“MQTTX CLI{.} is an open source MQTT 5.0 CLI Client and MQTTX on the command line. Designed to help develop and debug MQTT services and applications faster without the need to use a graphical interface.“\nLet\u0026rsquo;s have a look at the Simulate feature.\nMQTTX CLI Simulate Feature The Simulate feature can publish messages with dynamic content generated based on your template file. The feature uses the \u0026lt;strong\u0026gt;simulate\u0026lt;/strong\u0026gt; command. Let\u0026rsquo;s examine the parameters to.\nNote: behind the scenes, the Simulate command depends on the Publish command, so make sure to check the Publish parameters necessary, e.g. hostname, username, password..etc\nIn addition to the basic parameters to publish messages, the Simulates command has the following parameters to control the simulation:\n-count: Number of connections: represents the number of MQTT connections that will be created in the process. -interval-message: interval of publishing message to the broker (default: 1000ms) -limit: the number of messages to publish, 0 means unlimited (default: 0) -client-id: the client id, support %i (index) variable. Check the --\u0026lt;strong\u0026gt;count\u0026lt;/strong\u0026gt; parameter above to see how it is used. -topic: the message topic. If your topic will depend on the User, Client ID, or the count of simulated messages, then you can use %u (username), %c (client id), %i (index) variables in the value. -file: the JavaScript Module file that will be used to generate the payload. This JavaScript has a specific contract that you should adhere to so that it can be used to MQTTX CLI to generate the payload. Note: that all the connections will be established by the same client id unless you pass “%i”, if you do then each connection will have its unique generated client id based on the count. e.g. clientid_1, clientid_2…etc.\nLet\u0026rsquo;s have a look at the example template file in the docs, this simple simulator generates a simple payload with “temp” and “hum” properties. (in order to use it you pass the name of the file to the --file parameter).\n/** * MQTTX Scenario file example * * This script generates random temperature and humidity data. */ function generator(faker, options) { return { // If no topic is returned, use the topic in the command line parameters. // Topic format: \u0026#39;mqttx/simulate/myScenario/\u0026#39; + clientId, message: JSON.stringify({ temp: faker.number.int({ min: 20, max: 80 }), // Generate a random temperature between 20 and 80. hum: faker.number.int({ min: 40, max: 90 }), // Generate a random humidity between 40 and 90. }) } } // Export the scenario module module.exports = { name: \u0026#39;myScenario\u0026#39;, // Name of the scenario generator, // Generator function } You can see that the \u0026lt;strong\u0026gt;generator\u0026lt;/strong\u0026gt; function is the contract that will be used by the tool to generate the simulated payload. It takes two parameters: \u0026lt;strong\u0026gt;faker\u0026lt;/strong\u0026gt; that you can use to generate random and fake values, and \u0026lt;strong\u0026gt;options\u0026lt;/strong\u0026gt; if you want use any of the passed options to the command.\nAll what you need to do in your own file is to implement the generator function with your custom logic to generate the payload. For more inspiration you can look at some of the built-in simulation files.\nSimulate Azure D2C Message Now comes the most important part, sending simulated telemetry to Azure IoT Hub. Microsoft already provided some code samples to use MQTT directly to send messages. The highlight is that we need to send a message to the topic \u0026lt;strong\u0026gt;devices/{device_id}/messages/events/\u0026lt;/strong\u0026gt;\nWe need to send a message with the following parameters (make sure to replace the placeholder tokens with yours):\nHost: “{iothub_name}.azure-devices.net” Port: 8883 Client Id: “{device_id}” User: “{iothub_name}.azure-devices.net/{device_id}/?api-version=2018-06-30” Password: “{sas_token}” (this is generated by this command, choose a duration value that suits the lifetime of your test). Topic: “devices/{device_id}/messages/events/” Message: The payload of your telemetry CA certificate: if you want to validate the IoT Hub\u0026rsquo;s certificate, then you can provide the certificate that can be found here. Otherwise you can pass the \u0026lt;strong\u0026gt;--insecure\u0026lt;/strong\u0026gt; parameter to ignore validating the certificate. MQTT Version: this is necessary with MQTTX CLI as its default protocol version is 5.0, while Azure IoT Hub\u0026rsquo;s one is 3.1.1. Assuming that we have a device called “emad”, and an Azure IoT Hub called “youriothub”, and a template file called “simulatedTelemetry.js”, then the final command should look like this:\nmqttx simulate \\ --file simulatedTelemetry.js \\ -c 10 \\ --interval-message 1000 \\ --insecure \\ -q 1 \\ -V 3.1.1 \\ -h \u0026#34;youriothub.azure-devices.net\u0026#34; \\ -t \u0026#34;devices/emad/messages/events/\u0026#34; \\ --client-id \u0026#34;emad\u0026#34; \\ -u \u0026#39;youriothub.azure-devices.net/emad/?api-version=2018-06-30\u0026#39; \\ -P \u0026#39;long-sharedaccesstoken\u0026#39; \\ -l mqtts \u0026lt;/pre\u0026gt; \u0026lt;/div\u0026gt; Simulate Azure IoT Device Twin Reported Properties We can also use the same technique above for the Device Twin Reported Properties. The only difference will be the topic value which should be \u0026lt;strong\u0026gt;\\$iothub/twin/PATCH/properties/reported/\u0026lt;/strong\u0026gt;.\nIf you don\u0026rsquo;t want to use simulation to send the Reported Properties and just send it once with a specific payload, you can use the \u0026lt;strong\u0026gt;pub\u0026lt;/strong\u0026gt; command with a simple JSON payload. Like the following:\nmqttx pub \\ --file-read devicePropertyPayload.json \\ --insecure \\ -q 1 \\ -V 3.1.1 \\ -h \u0026#34;youriothub.azure-devices.net\u0026#34; \\ -t \u0026#34;devices/emad/messages/events/\u0026#34; \\ --client-id \u0026#34;emad\u0026#34; \\ -u \u0026#39;youriothub.azure-devices.net/emad/?api-version=2018-06-30\u0026#39; \\ -P \u0026#39;long-sharedaccesstoken\u0026#39; \\ -l mqtts Conclusion By this, I hope you can use MQTTX CLI to simulate device telemetry and Device Twins Reported Properties.\n","permalink":"https://emadashi.com/2025/04/simulate-azure-iot-telemetry-and-device-twin-using-mqtt-directly/","summary":"\u003cp\u003e\u003cstrong\u003eTLDR\u003c/strong\u003e;\u003c/p\u003e\n\u003cp\u003eIn this post I show how to simulate Azure IoT device D2C (Device to cloud) messages telemetry, and Device Twin Reported Properties using MQTTX CLI.\u003c/p\u003e\n\u003ch2 class=\"wp-block-heading\" id=\"introduction\"\u003eIntroduction\u003c/h2\u003e\n\u003cp\u003eI have been working in several Azure IoT projects in the past 3 years, where MQTT was the preferred device/server communication protocol. In these projects, there has been a repeatable need to generate MQTT messages to simulate devices\u0026rsquo; telemetry, without going through the Azure CLI.\u003c/p\u003e","title":"Simulate Azure IoT Telemetry And Device Twin using MQTT Directly"},{"content":"Summary Update: Tatham had a great thread of tweets about this posts where he filled several gaps in this post, including the need of the MQTT server. Check it out here: https://twitter.com/TathamOddie/status/1357904732027637760?s=20\nIn this post, I describe what I did to set up an M5 Atom Lite with a capacitive soil moisture sensor, configure it with ESPHome and connect it to Home Assistant. The Home Assistant is deployed in a Docker container on my Synology NAS (DS220+), and my dev machine is a MacbookPro.\nImportant: In this post, I rely on Tatham Oddie\u0026rsquo;s in-valuable video, which is a comprehensive guide and introduction to HomeAssistant, ESPHome, and M5 Atom Lite.\nSo I highly encourage you to check that video before you continue.\nDisclaimer: I am not expert in IoT or electricity, please consider this context with this post!\nTerminology and References To understand the rest of the article, this is a quick run-through of the main terms:\nM5 Atom Lite: an ESP32 device that is packaged nicely. You can program it with Arduino Framework (C++), or MicroPython. Capacitive Soil Moisture Sensor: measures the moisture of the soil, and produces the readings as analog stream. Home Assistant: A home automation server/tool. Connects to all the home-assistant-ready devices and presents a web dashboard where you can read and control these devices. ESPHome: a project through which you can program your ESP device and make it home-assistant-ready. Setting up Home Assistant with Docker My Synology NAS DS220+ was a perfect candidate to host the Home Assistant server, this is a guide that will tell you how to set it up with Docker.\nHowever, there is a small problem: if you checked Tatham\u0026rsquo;s video above, you will see that he added ESPHome to Home Assistant as an add-on. The problem is that the Supervisor menu item, through which you can add add-ons to Home Assistant, doesn\u0026rsquo;t exist in the Docker image of Home Assistant.\nTo solve this problem, I had to run an independent ESPHome instance in another Docker container to program my device.\nTo do that, I took the same steps in the guide I mentioned above for Home Assistant. The only difference is that:\nUsed the image “esphome/esphome:latest” of course! I mounted to a different folder under “docker” I called “esphome” And I exposed port 6052 Now you have an ESPHome instance running, and can create the first Node and application on the device.\nCreating the Node on ESPHome To access ESPHome dashboard, I navigate to HTTP://[nas-ip-address]:6052. And to make things easier for me, and for my password manager, I use the awesome service https://nip.io to give this address a proper name like https://esphome-[nas-ip-address]:6052.\nIn the ESPHome dashboard, I follow the wizard to create my Node, which is a representation of my device. In there, I can program my device using YAML, which will eventually generate C++ code.\nThe ESPHome editor already comes with a linter, so your mistakes will be corrected for you in the browser. However, if you want to have access to the generated C++ code, and examine the YAML file in VSCode, you can navigate to the code on the docker folder on your NAS.\nNote: When you install Docker on your NAS, the “docker” folder will not be visible on the network. So you have to untick the box ‘Hide this shared folder in “My Network Places”‘.\nGenerating the code I started with a very basic YAML to control the LED, I hit Compile menu item in the node to generate the C++ code that will be deployed to my device. Now I am ready to install the application on my device.\nesphome: name: m5atomlite2 platform: ESP32 board: m5stack-core-esp32 wifi: ssid: \u0026#34;wifi-ssid\u0026#34; password: \u0026#34;wifi-password\u0026#34; # Enable fallback hotspot (captive portal) in case wifi connection fails ap: ssid: \u0026#34;M5Atomlite2 Fallback Hotspot\u0026#34; password: \u0026#34;0yyQtzyIpw3z\u0026#34; captive_portal: # Enable logging logger: # Enable Home Assistant API api: password: \u0026#34;123\u0026#34; ota: password: \u0026#34;123\u0026#34; light: - platform: fastled_clockless chipset: SK6812 pin: 27 num_leds: 1 rgb_order: GRB name: \u0026#34;FastLED Light\u0026#34; Note: Make sure to use the right password for your wifi, and make sure you pick the right configurations for your LED: the pin number on your board and the chipset number of the LED you have.\nWhen you create the Node in the ESPHome dashboard and compile your YAML file, a folder with the same name will be created in the docker/esphome folder on your NAS (that is if you have followed the steps above, otherwise use the name of the folder you mapped).\nFlashing the device for the first time Update: Eranjo mentioned in the comments that the latest flasher version might not work, so you might need a previous version. Check his comment below for more details.\nCccording to Tatham\u0026rsquo;s video, I need to use something like esphome-flasher, but there was no version for macOS, and I need to find an alternative.\nTatham mentioned that there are many ways to flash an ESP device, but I consulted with my friend @Amal Abeygunawardana and found his suggestion interesting! Use the PlatformIO IDE on VSCode. This also gave me the opportunity to learn about programming my device without ESPHome, using the Arduino Framework (another story).\nOnce I opened the folder using VSCode, the PlatformIO IDE extension discovered that this is a folder it understands, and it launched the PlatformIO IDE hello page.\nI made sure my device is connected to my computer through USB and hit the PlatformIO: Upload command in VSCode. The command compiled and uploaded my firmware binary to the device.\nUpdate the device over the wifi Now that my device is set up for the first time, I can use ESPHome to upload to the device over the wifi.\nHowever, in my case, I had a problem: the ESPHome cannot find the device over the network using its name devicename.local. When I check the devices connected to my network, I can see my device and I can ping it! But the ESPHome is still blind to it.\nAs a workaround, I had to use the property use_address to give an explicit IP address to the node. I gave it the same IP address the DHCP already has given it before, so the wifi section of the YAML file became like this:\nwifi: ssid: \u0026#34;wifi-ssid\u0026#34; password: \u0026#34;wifi-password\u0026#34; use_address: 192.168.0.21 After doing that I managed to upload new changes over the wifi. (Please if you know a better solution let me know :)).\nAdding the device to Home Assistant In the Home Assistant dashboard, I navigated to Configuration menu item on the left, hit Integrations, and then at the bottom right corner hit ADD INTEGRATION. Once I am represented with a dialogue I searched for ESPHome.\nI put the IP address of the device and magic happens! Under Devices I could see my device, and when I navigated to the details I saw the LED control Entity.\nConnecting the moisture sensor Ok great, so far so good, but we should not forget what we are here for: a moisture sensor!\nI followed this video, but since my device is not Arduino, I had to figure out which pin I should use, and it was pin 33. Thanks to the form factor for the M5 Atom Lite, I only needed jumper wire.\nProgramming for the moisture sensor Now, all that I have to do is to search for how to configure my YAML file and add an Entity to read data from the moisture sensor. When I searched ESPHome, I couldn\u0026rsquo;t find a straightforward way to do that, but I stumbled upon the Analog to Digital Sensor, and it appeared to be the answer.\nSo I added the following segment to the YAML file (Valeria is the name of our plant :D):\nsensor: - platform: adc pin: 33 name: \u0026#34;Valeria\u0026#34; update_interval: 500ms attenuation: 11db filters: Of course, the update interval is too excessive, but it is good for debugging purposes when you dip the sensor in a cup of water.\nImportant Note: depending on the voltage of the sensor, you need to tune the attenuation property, the default is 0db, and I had to change it to 11db. Read the documentation of the Analog to Digital Sensor above for more information.\nIn ESPHome, I compiled and uploaded the new code, and managed to see the voltage readings next to the LED Entity, success! However, it was basic readings, and I needed a percentage. I found this post on Reddit when I was trying to figure out the Entity, and they already solved it for me :).\nSo the code below uses the Filter attribute. It takes the raw value of the readings, and passes it as a parameter to the subsequent function to return the result accordingly:\nsensor: - platform: adc pin: 33 name: \u0026#34;Valeria\u0026#34; update_interval: 500ms attenuation: 11db filters: - lambda: |- if (x \u0026gt; 3.74) { return 0; } else if (x \u0026lt; 1.53) { return 100; } else { return (3.74-x) / (3.74-2.85) * 100.0; } Of course, you have to find your lowest and highest raw readings to get the right formula for your sensor. In this case, the highest was 3.74, and the lowest was 1.53. (Update: these are not really accurate values, which explains why I get more than 100 in my video above, I also didn\u0026rsquo;t remove the label “v”, embarrassing!)\nToo much power consumption, let\u0026rsquo;s use Deep Sleep The M5 Atom Lite is a small microcontroller, but this doesn\u0026rsquo;t mean that it doesn\u0026rsquo;t consume a lot of power. Putting this in a plant pot powered by battery will not last long.\nThe good thing is that we can use the Deep Sleep mode, once the device is put in deep sleep mode, it will reduce power consumption and the battery will last longer depending on how long you put the device in this mode. For more information about ESP deep sleep, check the following article.\nTo put the device in deep sleep using ESPHome, we will update our YAML to include the Deep Sleep component:\ndeep_sleep: id: deep_sleep_1 run_duration: 10s sleep_duration: 2min This will put the device into deep sleep mode for 2 minutes, and then will wake up for 10 seconds to allow the other components to do their job, and then will sleep again for 2 minutes.\nBut Deep Sleep has a problem… There is a small problem, though, when you put the device in deep sleep mode: the device will shut down a lot of its capabilities, including CPU and wifi.\nThis means that the device will not be reachable for two minutes, and will only stay awake for 10 seconds. So if we want to update the firmware, this will be challenging.\nSo how can we solve this problem? well, if we can prevent the deep sleep mode the FIRST thing when the device wakes up, then we can update its firmware. Once we update the firmware, we re-enable deep sleep (not my genius idea, this is a common practice :))\nHow to achieve this I hear you say? The answer is MQTT. MQTT is a lightweight protocol to transmit messages between devices. The biggest advantage of this protocol is the persisted message concept: a client can push a message to the broker (server), and the message will stay there until another client (or same client) sends a new value to overwrite it. (also not my idea :D)\nSo if we push a message to the broker with a value like “turn off deep sleep”, and we configure the device to read from this broker the first thing when it wakes up, then we can achieve our goal!\nLuckily this is easy with ESPHome, we need to update our YAML file to use the MQTT component (God I love ESPHome!):\nmqtt: broker: 192.168.0.231 port: 1883 on_message: - topic: ota_mode payload: \u0026#39;ON\u0026#39; then: - deep_sleep.prevent: deep_sleep_1 - topic: sleep_mode payload: \u0026#39;ON\u0026#39; then: - deep_sleep.enter: deep_sleep_1 The above segment will program the device so that it will read a message from the server 192.168.0.231, specifically from the Topic “ota_mode” (the name of the topic can be anything you want). In the case there is a message, we check the payload, if it equals to ON, then we prevent the deep sleep component we configured above. However, if there is another message under the topic sleep_mode, then go back to sleep mode.\nIdeally, you don\u0026rsquo;t want two messages to represent one state, but let\u0026rsquo;s just go with this flow for now. Check the documentation of the MQTT Component to see how you can use Lambdas for tighter control (not AWS Lambda!).\nOops, but we don\u0026rsquo;t have an MQTT server! Did I mention I love Docker? We run an MQTT server in a container on NAS just like we did for Home Assistant and ESPHome above. For that, I chose the Mosquitto server, which already has a container image.\nThe only thing I want to bring your attention to is that I mapped a file to the container on the path /mosquitto/config/mosquitto.conf to host the configuration. And I had the following configuration content:\nallow_anonymous true listener 1883 If you don\u0026rsquo;t put the second line, the server will only accept messages from clients on the same machine. Please note as well that this is not a secure setup, so please be careful with your choices.\nNow, once I want to put my device OUT of sleep mode, I just send a message to the topic “ota_mode” with the value ON. And make sure that the topic “sleep_mode” doesn\u0026rsquo;t have the value ON. To do that I use the MQTT client “MQTT Explorer“, but you can also run the following command on your NAS through SSH:\ndocker exec -it [nameOfMosquittoContainerOnNas] mosquitto_pub -V mqttv311 -h localhost -d -t ota_mode “ON”\nConclusion That was actually a lot of fun, and it\u0026rsquo;s just astonishing how good Home Assistant and ESPHome is. I am usually suspecious of the quality and efficiency of any product that generates code to achieve something, especially from a DSL-like language. In this case, things look pretty solid!\nLet me know if you have any questions about this setup, I\u0026rsquo;d love hear from you, and I hope this helps you in your journey.\n","permalink":"https://emadashi.com/2021/01/m5-atom-lite-home-assistant-esphome-and-capacitive-soil-sensor/","summary":"\u003ch2 id=\"summary\"\u003e\u003cspan data-preserver-spaces=\"true\"\u003eSummary\u003c/span\u003e\u003c/h2\u003e\n\u003cp\u003e\u003cstrong\u003eUpdate\u003c/strong\u003e: \u003cem\u003eTatham had a great thread of tweets about this posts where he filled several gaps in this post, including the need of the MQTT server. Check it out here: \u003ca href=\"https://twitter.com/TathamOddie/status/1357904732027637760?s=20\"\u003ehttps://twitter.com/TathamOddie/status/1357904732027637760?s=20\u003c/a\u003e\u003c/em\u003e\u003c/p\u003e\n\u003cp\u003e\u003cspan data-preserver-spaces=\"true\"\u003eIn this post, I describe what I did to set up an \u003ca href=\"https://docs.m5stack.com/#/en/core/atom_lite\"\u003eM5 Atom Lite\u003c/a\u003e with a \u003ca href=\"https://duckduckgo.com/?t=ffab\u0026amp;q=capactive\u0026#43;soil\u0026#43;moisture\u0026#43;sensor\u0026amp;atb=v188-1\u0026amp;ia=web\"\u003ecapacitive soil moisture sensor\u003c/a\u003e, configure it with \u003ca href=\"http://esphome.io/\"\u003eESPHome\u003c/a\u003e and connect it to \u003ca href=\"https://www.home-assistant.io/\"\u003eHome Assistant\u003c/a\u003e. The Home Assistant is deployed in a Docker container on my \u003ca href=\"https://www.synology.com/en-us/products/DS220\u0026#43;\"\u003eSynology NAS (DS220+)\u003c/a\u003e, and my dev machine is a MacbookPro.\u003c/span\u003e\u003c/p\u003e","title":"M5 Atom Lite, Home Assistant, ESPHome, and Capacitive Soil Sensor"},{"content":"Summary This post explains my latest experience in contributing to open source software with project KEDA.\nLast week, the KEDA team accepted and merged a pull request I created to support Pod Identity in the Event Hub scaler. @Simon Wight, an amazing community person, encouraged me to write about my experience (cheers for the nudge Simon :)), and this post is that.\nI will explain how it all started, what I did to get it done, and all the fun and challenges that happened during that.\nHow it all started My relation with KEDA started in mid 2019, I think it was a presentation by Jeff Hollan. At that time I was already working with Kubernetes, and I was already familiar with Azure Functions. I have always been curious about scaling, whether it was Azure Functions or Containers, and KEDA came to complete this missing piece.\nThis explains the \u0026ldquo;interest\u0026rdquo; part of the contribution story, because no one can contribute to open source project, and give from their own time, unless the project is of interest to them. You need this spark to keep you going, because it\u0026rsquo;s not easy and at some point you will suspect yourself and say: \u0026ldquo;Oh man why am I doing this?!\u0026rdquo;.\nLater in the year, I also was interested in learning Go, and this brought me closer to the idea that I can contribute to a project like KEDA.\nOne Step at a Time The Pull Request (PR) that sparked this post was not my first contribution to KEDA, but it is definitely the biggest up until the moment of writing these words. I had to go by smaller steps, otherwise I would have been frustrated and left the thing from the beginning. So how did it start?\nUnderstanding The Code, and Contributing Docs Before I had the intention to contribute to KEDA, I was curious to understand how it works. I have always believed that in order to use a tool efficiently, you have to go one level of abstraction deeper, and if I wanted to understand how KEDA works then I need to check out the code.\nSo I did that! I cloned the code, and I started examining it, trying to understand it. This didn\u0026rsquo;t only give me an advantage of understanding KEDA, it was a very good way to learn Go itself. It\u0026rsquo;s worth mentioning here that I didn\u0026rsquo;t even try to build it; I didn\u0026rsquo;t have the intention to contribute at that moment and I didn\u0026rsquo;t want to go through the hassle of installing the prerequisites.\nAfter I became comfortable with how it works, I noticed that there are gaps in the documentation that are key to using KEDA in its full potential. So I decided to contribute to the documentation. I created my first PR to the docs, explaining how to write your own External Scaler.\nThis had two major benefits that helped in my future PRs:\n1. I became familiar with the maintainers I joined the KEDA Slack channel and had a couple of conversations with the maintainers on what is missing and what I intended to cover. This created a connection with the maintainers and allowed them, and myself, to understand the expectations, their method, and way of thinking.\nIn my case the maintainers were Tom Kerkhove, Zbynek Roubalik, and Ahmed ElSayed who are fantastic people; they are helpful, encouraging, and appreciating, kudos to them!\n2. I know more about the code now After that, I was in a much better position to contribute code. I knew how things work, in general, and where to find code and how to navigate it.\nThis also put me in a good position to speak about it in user groups and conferences, and even give workshops.\nIn addition to that, I started writing an External Scaler live on Twitch. External Scalers are not part of KEDA\u0026rsquo;s binaries; they are independent deployments that use gRPC to communicate with KEDA.\nAll of this increased my bond with the project.\nContributing The First Lines of Code This is where things get harder, but also more exciting!\nLet\u0026rsquo;s just build it for now! I already had cloned the repository, and already navigated it, now it\u0026rsquo;s time to run it. I didn\u0026rsquo;t want to do anything except a successful build and deployment; if I do these two successfully, I would have finished more than two thirds my way towards the first commit!\nThe reason is that there can be a lot of things that go wrong, even for such a simple task. You are setting a new environment from scratch, and making sure all the prerequisites and dependencies are installed the right way with the right version.\nReading the Contribution guide So I read the contribution guide, this is where you should start with any OSS you want to contribute to. Rather than fighting your way by \u0026ldquo;discovering\u0026rdquo; code, reading the contribution guide will show you at least the entry point. (Dah! but we also don\u0026rsquo;t read manuals to set up a washing machine, do we now!)\nHowever, the documentation was not complete at that time, and I had to do some discovery in order to have a successful build and deployment. The right place for that discovery was the Makefile (or the build script in other repos).\nFollowing the contribution guide, and wiggling my way through reading the Makefile, I managed to have a successful build and local deployment. This was another opportunity to contribute to the documentation, and I did (along with other stuff).\nFinding the smallest code contribution possible Ok, now I am ready! I wanted to find the smallest contribution that doesn\u0026rsquo;t require a lot of effort or knowledge. The easiest way to find that out is to search for bugs in the repo\u0026rsquo;s issues.\nWhy a bug? Because solving bugs is like solving a jigsaw puzzle that is already very close to being completed; a lot of the pieces are already there, you just need to fit the last couple of ones. Also, the expectation is very clear; this is why maintainers classify it as a bug, so achieving the result should be straightforward.\nFor my luck, when I was trying to run my deployment locally, I was using a sample that had a bug already. I thought it was something I did, so I searched for it in the repo\u0026rsquo;s issues, and I found that someone already reported it. Perfect! It seems it\u0026rsquo;s a legitimate bug, and maybe I should try solving it.\nSo I rolled my sleeves, opened the code, searched for that error string in the code, and found it. Traversing it back, I understood what the problem was, and thus the solution was relatively simple.\nCode contribution workflow, and creating the PR So what does the code change workflow look like?\nThis will depend on how comfortable you are with Git, but I do the following:\nFork the repo to my GitHub account. Clone my new fork to my disk (name the remote \u0026ldquo;eashi\u0026rdquo;). Add the original repo as another remote \u0026ldquo;origin\u0026rdquo;. So by now I have two remotes: \u0026ldquo;origin\u0026rdquo; from the remote repo, and \u0026ldquo;eashi\u0026rdquo; that is my fork. (you can swap the names, up to you) Create a branch for the new code. Push the new branch to my repo. Create a PR from the new branch in \u0026ldquo;eashi\u0026rdquo; to the \u0026ldquo;main\u0026rdquo; branch in the \u0026ldquo;origin\u0026rdquo; repo. After the maintainers merge the PR to the \u0026ldquo;main\u0026rdquo; branch in the project, I pull from the \u0026ldquo;main\u0026rdquo; in \u0026ldquo;origin\u0026rdquo; to the \u0026ldquo;main\u0026rdquo; branch in \u0026ldquo;eashi\u0026rdquo;. One step I didn\u0026rsquo;t mention above: I pull from the \u0026ldquo;origin main\u0026rdquo; to my repo\u0026rsquo;s \u0026ldquo;main\u0026rdquo; regularly if necessary.\nCreating the PR After I ran the code and validated that my code indeed solves the problem, I created a PR.\nThe description of the PR should make the goal of the code change clear, should describe how this PR achieves this goal, and it\u0026rsquo;s best if it includes reference to the issue that the PR is established upon.\nMost projects these days provide a checklist of prerequisites that have to be met before the PR can be merged and accepted. Maintainers try to make this easy by providing a template; when the contributor creates the PR the initial description of the PR explains how the PR should be structured.\nIn KEDA\u0026rsquo;s case, it\u0026rsquo;s 4 items:\nCommits are signed with Developer Certificate of Origin (DCO). Tests have been added. A PR is opened to update the documentation on https://github.com/kedacore/keda-docs. Changelog has been updated. I made sure that I ticked all the boxes in the PR.\nIn addition to this manual checklist, there is another automated checklist that PRs go through: the code needs to compile, the tests need to run successfully, and the code should be scanned.\nOf course these checks differ from project to project, and with the help of GitHub Actions this can run on every PR created, or every update to the PR.\nBe patient now! After you have created the PR, it will take time: days, sometimes weeks! Don\u0026rsquo;t be pushy, hasty, rude, or disappointed. Maintainers are humans, and they have families and priorities. This might not be their full-time job, and this PR might not be the top of their priority.\nIt\u0026rsquo;s good that you have given your time to contribute to the project, maintainers will really appreciate it. Trust that if it takes time before they merge or comment on your PR, it doesn\u0026rsquo;t mean that they don\u0026rsquo;t value your contribution.\nReceiving feedback on PR, and actioning on it It\u0026rsquo;s very rare that the PR will be merged without comments or feedback. Most of the time maintainers will have questions, at least. Any line of code that is added to the repo is a responsibility, and it\u0026rsquo;s good for all parties, including you, to only allow code that is of good quality and for a good reason.\nDon\u0026rsquo;t take the feedback personally. If you don\u0026rsquo;t agree with their comments, try to have a good conversation about it, assume their best intentions and try to convince them why things should be done your way. If they are not convinced, don\u0026rsquo;t be frustrated; after all it\u0026rsquo;s their responsibility to be that quality gate.\nJust a reminder here, that we are still talking about a small contribution like a bug, for example. In theory, this should have very little debate.\nBut I want to contribute a bigger and more important code This brings us to the PR that sparked this post. After I got more comfortable with the project as explained above, I felt I could take a bigger change.\nSo I started looking for issues that are a little bigger than a bug, and I found one that was perfect for me. At that time, I was interested in Azure\u0026rsquo;s Pod Identity, I read a couple of articles about it and I got the basic concepts, but it was not too clear in my head.\nThe issue I found was \u0026ldquo;support AAD Pod Identity authentication for azure event hubs\u0026rdquo;. It\u0026rsquo;s something I was already interested in, it\u0026rsquo;s a little bit bigger than a bug, and it\u0026rsquo;s something I thought I could deliver. Was I confident that I could do this? Not really, and that\u0026rsquo;s alright! If you find yourself in such a situation don\u0026rsquo;t worry, try to embark on the mission and you will learn your way through.\nSometimes there isn\u0026rsquo;t a clear issue that makes things easier for contributors. In this case I urge you to reach out to the contributors on chat, Twitter, or whatever means to express your interest in helping; they will guide you.\nSo I put a comment on the issue to express my interest in doing it; there is a possibility that someone is already working on this issue, and I don\u0026rsquo;t want to offend anyone, and I don\u0026rsquo;t want to waste my effort.\nHow much effort was it? From the minute I showed interest up until the PR was merged, it was 40 days. The change wasn\u0026rsquo;t big, it was mainly in two significant files, and around 60 lines of code. So where did the time go?!\nInvestigating and researching A lot of my time was investigating and researching; trying to understand the libraries I was depending on, and trying to understand how Pod Identity really works.\nSetting the dev environment I already mentioned above that I contributed small code changes before, but when I wanted to do this code change I messed up my dev environment by installing different versions of the dependencies.\nThis caused some disruption and urged me to go the \u0026ldquo;Remote Containers\u0026rdquo; path, for which there was already some guidance in the contribution guide. However, for some reason things didn\u0026rsquo;t work for me, and I had to wiggle my way through again to set things up.\nI wanted to have a separate docs contribution for that part, but magically the bad behaviors stopped appearing. Keep in mind that this might happen to you too :).\nDesigning This might be a little too much wording for such a change, but I was trying to achieve the goal of the issue with the least amount of disruption to the code, and still adhere to the general spirit of the code.\nTroubleshooting This one was really hard, because debugging in Kubernetes is not too straightforward. I had to fill the code with logging statements and re-deploy every time I figured out that I was in a blind spot, contrary to the traditional \u0026ldquo;put a breakpoint\u0026rdquo; way.\nCode, deploy, and test cycle The cycle of introducing the change, deploying it, running it, checking the result, and then changing code again was time consuming. Especially that it involved deploying to Azure AKS because the feature was Azure specific.\nThis is where most of my time went, all from late nights and weekends.\nHaving an Azure Subscription I am fortunate enough to have a subscription that I am not paying money for from my own pocket. This allowed me to really contribute to this feature. If I didn\u0026rsquo;t have such a subscription it would have been an expensive contribution to OSS for me.\nThankfully as well, Microsoft announced in Ignite that you can shut down an AKS cluster \u0026ldquo;az aks stop/start..\u0026rdquo;, that made a good difference :).\nCongratulations, The PR is Merged, Now What? This needs a celebration! But this also means responsibility. I still worry at some point that my code might have a bug, but this comes with the package, and I believe that I have to keep an eye on the issues to make sure I can fix whatever is reported.\nConclusion It was a long journey, but it doesn\u0026rsquo;t have to be that way. Everybody is different; their priorities, capabilities, interest, time, etc.\nSo this isn\u0026rsquo;t necessarily guidance, but it\u0026rsquo;s my experience in contributing to OSS, and I hope it will help you navigate your way through.\n","permalink":"https://emadashi.com/2020/11/contributing-to-open-source-software-with-project-keda/","summary":"\u003ch2 id=\"summary\"\u003eSummary\u003c/h2\u003e\n\u003cp\u003eThis post explains my latest experience in contributing to open source software with project KEDA.\u003c/p\u003e\n\u003cp\u003eLast week, the \u003ca href=\"https://github.com/kedacore/keda\"\u003eKEDA\u003c/a\u003e team accepted and merged a \u003ca href=\"https://github.com/kedacore/keda/pull/1305\"\u003epull request I created\u003c/a\u003e to support \u003ca href=\"https://github.com/Azure/aad-pod-identity/tree/master/charts/aad-pod-identity#configuration\"\u003ePod Identity\u003c/a\u003e in the \u003ca href=\"https://keda.sh/docs/2.0/scalers/azure-event-hub/\"\u003eEvent Hub\u003c/a\u003e scaler. \u003ca href=\"https://twitter.com/simonwaight\"\u003e@Simon Wight\u003c/a\u003e, an amazing community person, \u003ca href=\"https://twitter.com/simonwaight/status/1328519554016788481?s=20\"\u003eencouraged me\u003c/a\u003e to write about my experience (cheers for the nudge Simon :)), and this post is that.\u003c/p\u003e\n\u003cp\u003eI will explain how it all started, what I did to get it done, and all the fun and challenges that happened during that.\u003c/p\u003e","title":"Contributing to Open Source Software with Project KEDA"},{"content":"Earlier this month I was invited to talk about Azure Functions on Kubernetes at the Integration Down Under meetup. It\u0026rsquo;s an amazing meet up held by highly regarded professionals like from all around Australia.\nBelow is the recording of the session, make sure to follow their channel because they post regularly. Also all feedback is welcome :).\n","permalink":"https://emadashi.com/2020/06/azure-functions-on-kubernetes-talk-with-integration-down-under-meetup/","summary":"\u003cp\u003eEarlier this month I was invited to talk about Azure Functions on Kubernetes at the Integration Down Under meetup. It\u0026rsquo;s an amazing meet up held by highly regarded professionals like from all around Australia.\u003c/p\u003e\n\u003cp\u003eBelow is the recording of the session, make sure to follow their channel because they post regularly. Also all feedback is welcome :).\u003c/p\u003e\n\u003cdiv style=\"position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;\"\u003e\n      \u003ciframe allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen\" loading=\"eager\" referrerpolicy=\"strict-origin-when-cross-origin\" src=\"https://www.youtube.com/embed/wbn4wZab_9Q?autoplay=0\u0026amp;controls=1\u0026amp;end=0\u0026amp;loop=0\u0026amp;mute=0\u0026amp;start=0\" style=\"position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;\" title=\"YouTube video\"\u003e\u003c/iframe\u003e\n    \u003c/div\u003e","title":"“Azure Functions on Kubernetes” Talk With Integration Down Under Meetup"},{"content":" This is part 2 of the three-parts blog post about my Twitch streaming setup. Hardware Software (this post) Humanware As I have said before, I have learned a lot from amazing streamers like @noopkat and @csharpfritz so you will find a lot of this content matches theirs. OBS Streaming Configuration OBS is the main software that streams to the streaming service (Twitch in my case). I used Streamlabs at the beginning, but because it's just an abstraction over OBS, I faced some limitations when I wanted to try different plugins. So I preferred to play directly with the OBS itself. Media is not really my expertise, and I don't like to stray away from the default configuration OBS has for streaming, so I let OBS do the test and suggest the best configuration. The following is the suggested configuration: Output Video Bitrate: 2500 Kbps Encoder: Software (x264) Audio Bitrate: 160 Video: Base (Canvas) Resolution: 1920×1080 Output (scaled) Resolution: 1280×720 (I am not sure if this is the best configuration, but this is what I am using now 🤷🏻‍♂️). Common FPS Values: 60 Audio: Sample Rate: 44.1 kHz Channels: Stereo OBS Scene Setup In OBS, the way you construct the scene is by creating layers of Sources, each Source can be an image, web page, video…etc. It needs a little bit of time getting used to, but you can check their website for more detailed guides. Below is the scenes setup I use, and here it is in an exported JSON format. The Starting Soon scene When it's time for my stream to start, I don't start the meaty content of the stream instantly. Instead, I display “starting soon” scene to give a chance for the people to join it, this only lasts for a couple of minutes not more. In this scene, I only show a small video in a loop, without exposing my microphone audio. Some, however, make it really cool like @csharpfrits and @BaldBeardedBuilder displaying their shadows as they move to prepare for the stream. The Me Talking scene After displaying the Starting Soon scene for about two minutes, I bring the Me Talking scene up. It's a focus on my face with a display of the chat overlay next to it. In the scene, I also display my twitter handle for people who don't know me, they can instantly look me up on Twitter (I stole this from @davidwengier :D). I use this scene to establish a connection with the viewers, without them being distracted by code. It feels more direct and clear. I usually do a recap here, I explain what we went through in the last session, and what is our plan for that day's session. In these scenes, I utilise my greens screen. My office is not the best office in the world, and having a green screen means I can put a soothing blue background. I haven't gone crazy with my backgrounds but will experiment with this in the future. The biggest trick in this one is to remember to switch to the Code scene; it happened twice when I jumped into the coding part while the scene displayed was still at my big face only, no code, *facepalm*! There are some plugins that allow automatic switch, but I haven't checked them out. I also display the chat-box using the Chat-box extension from Streamlabs. I display this on all my scenes (ops! except for the Secret scene below, I just remembered while typing this 😅). The reason why I display the chat is that Twitch doesn't allow you to keep the videos as an archive, so I offload them to YouTube. Once the video is on YouTube, there will be no capture for the chat unless I record it part of the video. I know if I stream on YouTube directly, the chat messages will be replayed alongside the recording of the stream, I think this is a beautiful feature. I might consider broadcasting on YouTube in the future, but I'm focusing on one platform for now. The Coding scene The coding scene is the one I show most of the stream. I have a part (on the left) where I show the code editor/desktop/web pages, a part I where show the chat messages (top right), and a part I show my camera (bottom right). You will notice that I totally separate the chat and the camera from the code editor, unlike other streamers who show their cameras and chat on top of the code editor. My main reason for this setup is that in rare cases I have to show something at the right corner of the screen, and my camera or the chat will obstruct it otherwise. The Secret scene In this scene, I show a funny video in a loop for people juggling knives. I show the video, my camera, and my audio. Sometimes I need to display secret tokens or passwords on my screen. I have three monitors but I stream one of them only, so I could just simply move my editor to the other screen. However, moving the windows around is a little bit tricky because they don't fill my window (check the “The Main Monitor” section below for why). Thus, I decided to have this Secret scene, it's also funny 😀 I have streamed before writing a Visual Studio Code extension that hides YAML nodes that are secrets, but it uses regular expressions, and it was never published. My next stream by god willing will be a new extension that is built better using proper YAML parser (did I just say “build it again but better”?! we developers never change!). Audio I use Soundflower to create the right audio setup. It is necessary to convert the audio output of your machine to be another audio source for the stream. Here is a video on YouTube I found useful on how to set it up. I use my H2N microphone mentioned in part 1 as the main microphone. Music is too distracting to me during coding, so I don't play music at all. The Pilot's View of the Setup This is how is my view when I am streaming, I have two external monitors and the laptop's screen: The Main Monitor This is where I write the code, and you can see that I have left some room on the right to fit the chat overlay so that it's captured with the video, this will allow the chat to be a permanent part of the recording so that people who watch the video later on a different medium can relate to my comments on the chat. It needed some time to get used to because I am usually a full-screen guy, but after awhile you just don't see the void. The OBS monitor This is where I leave my OBS open, and where I click to switch scenes whenever I need to. I also use it sometimes to read the chat from the chat overlay. This is not optimal as I often find myself squeezing my eye to read the small font. And because it's away from the camera, it seems I “look away” from the audience to read what they are saying. The only good thing about reading the messages from OBS itself is that I am reading from the same view source the audience read from. This way, if for some reason the overlay is not working I wouldn't be reading something the audience is not seeing. In my future streams, I will grab the link of the chat overlay and put it in a browser, and then squeeze that browser window next to my VSCode. This way I won't look away from the audience to read their messages. (I tried this before when I was proof-reading this post, didn't work because the chat overlay had a minimum width :(. Will update you when I find a better solution). The laptop monitor I use this screen as an auxiliary monitor if required, recently I start opening the native Twitch app to see how things are going on the other streaming end. (I have no idea why at that time Twitch App was complaining about the internet :D). AppleScript: I have been a Windows user for so man years of my life, I wish there is an equivalent for AppleScript in Windows (Maybe there is, let me know if there is). It automates many aspects of the MacOS: opening applications, resizing windows, changing settings, and a lot more. I got this tip from @noopkat (like many other tips). Just before I start my streaming session I run my script and it opens OBS, opens a clean browser window, resizes my VSCode and place it in the right position…everything! You can have a look at it here Visual Studio Code After .NET Core, and MacBook becoming my main PC, my main IDE has become Visual Studio Code. I love its reliability, lightness, and extensibility. There is a feature in VSCode called “ScreenCast Mode” (thanks @ShahidDev for the tip), it prints the keys pressed down on the keyboard. This is a very good way to share with the audience the love of shortcuts. There are tools that work on the OS level, but I haven't used it yet. I have my eye on Keycaster, haven't tried it yet though. Zsh as terminal I can't really speak a lot about this one, it's a feature-rich terminal that is also extensible, however, I haven't really utilised a lot of its features. I hope @tkoster is not disappointed as he is my guide in anything related to Unix and Linux! Twitch channel setup Truly, Twitch does NOT have the best UX for their platform, it's confusing to say the least. However, they are constantly changing things around and try their best to improve. The customisable page in your channel (at least at the time of writing these words) is the About page, you can add panels and custom content. Below are the panels I have. About Me panel This where the bio goes, I like to use the first singular on Twitch because it's a direct conversation with the audience, it makes sense to say “hi, welcome to my channel” than “Emad is a developer…”. After I had this panel for a while, Twitch decided to display the About Me info you are in your profile in the About page, this somehow made this panel is redundant. However, the About Me in the profile is limited to 300 characters, this one you can write more, hence I renamed mine to “More About Me”! Stream Schedule panel This is an extension from Streamlabs to show the visitors when your next stream is. Twitch has introduced their own Schedule page in the channel, so this one might be redundant. I am not sure if this is really benefiting the audience though, at some point I was thinking of creating my own Google calendar for the streaming and let people subscribe to it so they know when I cancel one. I might still do it so stay tuned, and let me know if you would like that too. Twitter feed panel There is nothing like Twitter to tell people who you really are (not really, it's only 140 characters of text!). This extenstion provides a list of your most recent tweets. Chat Bot Up until writing this post, I didn\u0026rsquo;t have a chat bot. But in the last stream one of the audience sent “!theme”, and I didn\u0026rsquo;t have a bot to answer, so I stopped whatever I was doing and started showing my theme. If I had a chat bot setup this wouldn\u0026rsquo;t have happened.\nThe next step for after posting this is to set up a new Bot. There are so many bots out there, this video shows several of them. I am already leaning towards nightbot, but I also know that @chahrpfritz has been working on one, so let\u0026rsquo;s see how it goes, probably will be another post so stay tuned or ping me if I don\u0026rsquo;t write about it ;).\nSummary As you can see, this is a space of a continuous change; you will find yourself keep changing setups, and tweaking settings here and there until you find the final setup, which soon will change after :D.\nI hope this was beneficial, let me know if you need more information.\n","permalink":"https://emadashi.com/2020/06/my-twitch-streaming-setup-part-2-software/","summary":"\u003cp class=\"code-line code-line\" data-line=\"0\"\u003e\n  This is part 2 of the three-parts blog post about my Twitch streaming setup.\n\u003c/p\u003e\n\u003cli class=\"code-line code-line\" data-line=\"2\"\u003e\n  \u003ca title=\"https://www.emadashi.com/2020/05/my-twitch-streaming-setup-part-1-hardware/\" href=\"https://www.emadashi.com/2020/05/my-twitch-streaming-setup-part-1-hardware/\" data-href=\"https://www.emadashi.com/2020/05/my-twitch-streaming-setup-part-1-hardware/\"\u003eHardware\u003c/a\u003e\n\u003c/li\u003e\n\u003cli class=\"code-line code-line\" data-line=\"3\"\u003e\n  Software (this post)\n\u003c/li\u003e\n\u003cli class=\"code-line code-line\" data-line=\"4\"\u003e\n  Humanware\n\u003c/li\u003e\n\u003cp class=\"code-line code-line\" data-line=\"6\"\u003e\n  As I have said before, I have learned a lot from amazing streamers like \u003ca title=\"https://twitch.tv/noopkat\" href=\"https://twitch.tv/noopkat\" data-href=\"https://twitch.tv/noopkat\"\u003e@noopkat\u003c/a\u003e and \u003ca title=\"https://twitch.tv/csharpfritz\" href=\"https://twitch.tv/csharpfritz\" data-href=\"https://twitch.tv/csharpfritz\"\u003e@csharpfritz\u003c/a\u003e so you will find a lot of this content matches theirs.\n\u003c/p\u003e\n\u003ch2 id=\"obs-streaming-configuration\" class=\"code-line code-line\" data-line=\"10\"\u003e\n  OBS Streaming Configuration\n\u003c/h2\u003e\n\u003cp class=\"code-line code-line\" data-line=\"11\"\u003e\n  \u003ca title=\"https://obsproject.com/\" href=\"https://obsproject.com/\" data-href=\"https://obsproject.com/\"\u003eOBS\u003c/a\u003e is the main software that streams to the streaming service (Twitch in my case). I used \u003ca title=\"https://streamlabs.com/\" href=\"https://streamlabs.com/\" data-href=\"https://streamlabs.com/\"\u003eStreamlabs\u003c/a\u003e at the beginning, but because it's just an abstraction over OBS, I faced some limitations when I wanted to try different plugins. So I preferred to play directly with the OBS itself.\n\u003c/p\u003e","title":"My Twitch Streaming Setup – Part 2 Software"},{"content":"There has a been a lot of interest lately about home studio setup for streaming and recording videos. In this post I will explain my Twitch streaming setup, and my experience thus far.It\u0026rsquo;s been less than a year for my journey in streaming on Twitch, and I am still learning and trying things out, so take these posts with this context.\nWhile writing this post, I realised that it\u0026rsquo;s going to be a long one, so I will break it down into three posts:\nHardware (this article) Software Humanware Laptop At the beginning of my journey, I streamed from a Surface Pro 4 (Intel Core i7-6650U 2.2 to 3.4 GHz and 16G RAM). This worked fine when I streamed while working on pure Azure tasks that didn\u0026rsquo;t involve any CPU consumption. But when I started doing local development and compiling code, my frames started dropping and my audience started complaining about the quality of my stream.\nSo when it was time for my Toolkit Allowance renewal (thanks Telstra Purple!), I decided to bump to the best machine I could afford. I read many confusing opinions on the internet about the role of GPU in a stream, and I couldn\u0026rsquo;t decide whether to get a good GPU machine or good CPU machine. Since I don\u0026rsquo;t buy a machine every day, and I had some space to bump the budget in addition to the allowance, I decided to get both, GPU AND CPU :).\nNow I stream from a Macbook Pro (32G RAM 2.3 GHz 8-Core Intel Core i9, Radeon Pro Vega 20 4 GB).\nThe strongest voice I heard on the internet was that you want to concentrate on the CPU, but I will leave this homework for you. Needless to say, I don\u0026rsquo;t have a problem compiling, streaming, and recording at the same time now.\nMicrophone Long before I got into streaming I started a podcast, and for some time I was looking for the right microphone, I needed a microphone that was of good audio quality AND has the functionality of recording in case I was on the go, and I found these in the Zoom H2N. I call this the awesome microphone, but I also believe that this is an overkill for most people who would like to start streaming or producing professional video content.\nMicrophone Mount I got an unbranded microphone mount from eBay, you can see from the picture that I am hanging it to the bookshelf next to me, not to my desk; my desk is pretty thick and the base of the mount won\u0026rsquo;t fit on it. But as a nice outcome hanging it on the bookshelf, the noise coming from the keyboard is barely present.\nI put the microphone\u0026rsquo;s gain to the highest; I stream in the night when the kids are asleep, and I am in a relatively quiet suburb. I position the microphone as close as possible to my face just before appearing in my camera. I am not 100% that the audience doesn\u0026rsquo;t get any pffff sound due to the high gain, but so far no one has complained :).\nCamera I have the Logitech C920, it\u0026rsquo;s pretty very common amongst streamers and for a very good reason. It\u0026rsquo;s very well balanced between prices and features, I love the angle it takes, the quality of the picture, and the auto-focus. Having said that, the only way I am using it to record my face; I don\u0026rsquo;t do close up reviews to products and I don\u0026rsquo;t need to move it off the top of my screen.\nKeyboard Late 2018 I bought one of the early models of Vortex Race 3 with Silver switch. This is absolutely not necessary for a successful stream, but mechanical keyboards are just luxurious nice feeling :D.\nI kinda regret the Silver switch as I tend to make too many mistakes while touch typing. If time goes back I would get a Red switch instead.\nUSB Hub(s) I would have loved to get a proper docking station, but the decent ones are expensive AND they don\u0026rsquo;t support my old VGA monitors, so I went with the hubs option instead.\nFive Ports UGREEN USB-C hub It\u0026rsquo;s funny that the hub is too old now that I couldn\u0026rsquo;t find it on their website 😀 to link it in this post, here is a picture for it.\nThis hub takes:\nOne of the monitors an Ethernet cable (a must for streaming in my opinion) The microphone The mouse The camera Generic USB-C VGA adapter With extra USB-A peripheral to take my keyboard and the other monitor.\nkey-chain USB-A to USB-C adapter I use this adapter to connect my USB Logitech headset. I don\u0026rsquo;t use this headset\u0026rsquo;s microphone, only the headphone. Having said that, I don\u0026rsquo;t really play any music or crazy sounds during the stream, so I don\u0026rsquo;t put the headset on my head most of the time.\nStudio Setup I was lucky enough to find a relatively cheap studio setup on eBay. In preparation for this post I searched for the item on eBay and it seems the price has gone up :).\nThe bundle had:\nGreen, White, and Black backdrops. The material is very poor, I am not sure what it is called, but I tried to iron it once and it almost melted. It works 99% of the time, but I noticed recently that the wrinkles confused my chroma key, and I wouldn\u0026rsquo;t get a perfect removal. The good thing is that it\u0026rsquo;s not too noticeable, and most of the time during my stream the focus is on the code scene. Big stand to hold the green backdrop, it consists of two extensible mounts and a 4-pieces rod to sit across them. Then you put the green backdrop on it and tighten it with clippers came with the bundle (a little bit of a hassle really). Two mounts to hold the lights bulbs Two 135W 5500K light bulbs Two white umbrellas And some accessories I don\u0026rsquo;t use (two black umbrellas and reflectors) If time goes back, I would have changed the tools a little:\nI would get the new shiny LED lighting that can be mounted to the desk behind the screens. There are many lighting setups like this but I think the newest one out there is the Elgato Key Light (Update: I have received mixed feedback about the quality of the Elgato Key Light, so this is NOT a recommendation. Please do your homework and assess before buying). The lightning itself is not a problem, but setting the lightning every time is just too tedious. I would get an easy-setup green screen, also Elgato has a collapsible green screen that can be easily setup/taken off. For the same reason, setting this thing up and tearing it down just takes an uncomfortable time. In addition to the wrinkles problem above. Surface Pro 4 (Not necessary) Sometimes during my stream, I\u0026rsquo;d like to explain something on a whiteboard, and using the mouse for that isn\u0026rsquo;t really natural. So I thought I can use my old Surface Pro 4 laptop. I tried at the beginning to use NDI to stream from two laptops, but it just wouldn\u0026rsquo;t work.\nSo instead I used the Microsoft Whiteboard app: I use my SP4 to draw on the whiteboard, and then connect to the same whiteboard from my Mac. There can be a small delay between drawing and appearing on the screen, but it wasn\u0026rsquo;t that much. However, this setup is a little tedious and I am thinking of alternatives.\nSummary So this is my Twitch streaming setup. It\u0026rsquo;s worth mentioning that I didn\u0026rsquo;t get all of this setup at once, I accumulated it over time. I had the microphone first, then the camera, then the green screen and lightning…etc, and this was over many months.\nYou can also slice the budget even more if you choose lower end microphone, and a normal keyboard.\nI hope this was beneficial, if you have any questions please let me know in the comments, or ping me on Twitter at @emadashi, would love to hear from you. Stay tuned for the two coming sections: Software and Humanware.\n","permalink":"https://emadashi.com/2020/05/my-twitch-streaming-setup-part-1-hardware/","summary":"\u003cp\u003eThere has a been a lot of interest lately about home studio setup for streaming and recording videos. In this post I will explain my \u003ca href=\"https://twitch.tv/emadashi\"\u003eTwitch\u003c/a\u003e streaming setup, and my experience thus far.It\u0026rsquo;s been less than a year for my journey in streaming on Twitch, and I am still learning and trying things out, so take these posts with this context.\u003c/p\u003e\n\u003cp\u003eWhile writing this post, I realised that it\u0026rsquo;s going to be a long one, so I will break it down into three posts:\u003c/p\u003e","title":"My Twitch Streaming Setup – Part 1 Hardware"},{"content":"TDLR; Minikube recent version might not be able to read old profiles. In this post we will see how to fix a Minikube invalid profile, at least how I did it in my case.\nminikube profile list, invalid profile Last Saturday, I had the privilege to speak at GIB Melbourne online, where I presented about Self-hosted Azure API Management Gateway. In the presentation, I needed to demonstrate using Minikube, and I spent couple of days preparing my cluster and making sure everything is good and ready.\nOne day before the presentation, Minikube suggested to me to upgrade to the latest version, and I thought: “what is the worst thing that can happen”, but then then responsible part of my brain begged me not to fall into this trap, and I stopped. Thank god I did!\nAfter the presentation I decided to upgrade, so I upgraded to version 1.8.1 (I can\u0026rsquo;t remember the version I had before) but then none of my clusters worked!\nWhen I try to list them using the command “minikube profile list” I find it listed under the invalid profiles\nOh this is not good! Was this update a breaking change that hinders my clusters unusable? Or is it that the new Minikube version doesn\u0026rsquo;t understand the old Profile configuration? And is the only way I am supposed to solve the problem is by deleting my clusters?! I am not happy.\nCan I fix the configs? Before I worry about breaking changes, let me check what a valid profile looks like in the new update, so I created a new cluster and compared the two profiles. You can find a cluster\u0026rsquo;s profile in .minikube/profiles/[ProfileName]/config.json.\nThe following are the differences that I have noticed:\nThere is no “MachineConfig” node in the configuration, and that most of its properties are taken one level higher in the JSON path. The “VMDriver” changed to “Driver”. The “ContainerRuntime” property is removed. There are about 4 properties introduced HyperUseExternalSwitch HypervExternalAdapter HostOnlyNicType NatNicType The “Nodes” collection is added, where each JSON node represents a Kubernetes cluster node. Each node has the following properties: Name IP Port KubernetesVersion ControlPlane Worker In the KubernetesConfig, the Node properties are moved to the newly created collection “Nodes” mentioned above: “NodeIP” moved to “IP” “NodePort” moved to “Port” NodeName moved to Name A new property ClusterName is added The Solution So what I did is that I changed the old profile format to match the new format, and set the new and different properties to the values that made most sense just like above. All was straight forward except for the Node IP address; It\u0026rsquo;s missing!\nDigging a little deeper I found the IP address value (and other properties) in the machine configuration “.minikube/machines/[clustername]/config.json”. I copied these values from there and then ran my cluster to be resurrected from the dead!\nI would have loved if Minikube itself took care of fixing the configs rather than suggesting to delete the profiles. Or maybe that can be a Pull Request :).\nI hope this helps.\n","permalink":"https://emadashi.com/2020/03/how-to-fix-minikube-invalid-profile/","summary":"\u003cp\u003eTDLR; Minikube recent version might not be able to read old profiles. In  this post we will see how to fix a Minikube invalid profile, at least how I did it in my case.\u003c/p\u003e\n\u003ch2 class=\"wp-block-heading\" id=\"minikube-profile-list-invalid-profile\"\u003eminikube profile list, invalid profile\u003c/h2\u003e\n\u003cp\u003eLast Saturday, I had the privilege to speak at \u003ca href=\"https://www.integrationbootcamp.com/\"\u003eGIB Melbourne\u003c/a\u003e online, where I presented about \u003ca href=\"https://www.youtube.com/watch?v=tGMJOfa9ZT8\"\u003eSelf-hosted Azure API Management Gateway\u003c/a\u003e. In the presentation, I needed to demonstrate using Minikube, and I spent couple of days preparing my cluster and making sure everything is good and ready.\u003c/p\u003e","title":"How to Fix Minikube Invalid Profile"},{"content":"This post explains how to have posh-git prompt style in Oh My Zsh theme on Mac.\nAfter 4 years of using Windows, I am coming back to using a Mac. And there are so many things in Windows I am missing already. One of these things is posh-git; I loved how in one glance to your prompt you know the status of your git repo: how many files changed, how many added, how many deleted, how many indexed… just love it!\nOnce I moved to Mac, I changed my shell to use zsh using Oh My Zsh due to the rich experience it brings to the terminal. I was delighted to see all these themes and plugins, and then started looking for a theme that provided the same information posh-git prompt provided. To my surprise, there was none! So I started my quest to see how I can change zsh, the theme, or the plugin to have such prompt.\nBeing lazy, I wanted change an existing theme I like with the least amount of investment. I looked in the documentation to see how I could do that, and found the customisation wiki page:\nShould I override the theme? Overriding the theme seemed to be the perfect solution, however, there were couple of drawbacks:\nWhen you override a theme, you override the theme, period! This means that if the author changes something after you have overridden it, you will not get these new changes. It was a little bit too much for me to grasp! When I looked at avit theme as an example, I had questions like what is PROMPT and PROMPT2? What are all these special characters? Where is the reference/documentation to all of these? Are they theme-specific, or are they part of zsh theme reference? Remember I wanted to put the least amount of effort, and I surely didn\u0026rsquo;t want to learn the whole thing! But while looking into avit theme, one thing grasped my attention: there was a clear reference to what seemed to be like a function git_prompt_info. And I thought this should be it, if I could find where this function is and how to override it.\nTo my luck, it was mentioned as an example in the customisation wiki page as an example!\nOverride the internals it is! Ok great, now I know that I can customise git_prompt_info, all what I need is to mimic whatever posh-git does in that function!\nSo I hit google duckduckgo again on the hope that someone already did this, and oh my! I found that there is already a port of it on bash. That\u0026rsquo;s great, now what should I do? Replace the call of prompt_git_info in the theme with a call to ___posh_git_ps1_? Or should I call it from prompt_git_info? Since prompt_git_info is an internal lib function, it is probably used in many themes, thus it will make sense to just call **_posh_git_pst**_ from within. And to my good surprise, there is a GitHub issue in the posh-git-bash repo that discusses integrating with zsh, it\u0026rsquo;s even referenced in the main README.md file of the repo.\nInitially I mistakenly called the **_posh_git_ps1**_ function, but I soon realised that I need to print (echo) the git info just like prompt_git_info did rather than changing any variables, for that I should use the **_posh_git_echo**_.\nAnd thus I ended up with a file called emad-git-prompt.zsh under the path ~/.oh-my-zsh/custom with the content of posh-git-bash here, and at the end of the file I wrote the following code:\ngit_prompt_info () { __posh_git_echo } I hope this helps you 🙂\n","permalink":"https://emadashi.com/2019/10/posh-git-mac-using-oh-zsh-themes/","summary":"\u003cp\u003eThis post explains how to have posh-git prompt style in Oh My Zsh theme on Mac.\u003c/p\u003e\n\u003cp\u003eAfter 4 years of using Windows, I am coming back to using a Mac. And there are \u003ca href=\"https://twitter.com/EmadAshi/status/1183642418765168640?s=20\"\u003eso many things\u003c/a\u003e in Windows I am missing already. One of these things is \u003ca href=\"https://github.com/dahlbyk/posh-git\"\u003eposh-git\u003c/a\u003e; I loved how in one glance to your prompt you know the status of your git repo: how many files changed, how many added, how many deleted, how many indexed… just love it!\u003c/p\u003e","title":"Posh-git on Mac using Oh My Zsh Themes"},{"content":"Summary This post explains why and how I learned the Go language. Hopefully this will help you to learn it quickly, or will inspire you on how to learn new languages.\nThe Reason to Learn a New Language There can be many reasons why someone would want to learn a new language, the main ones to me are: 1) To solve a current business problem 2) Learn concepts to adapt to current tools 3) For fun and passion. Of course, you can have a mix of these reasons to push you to learn a new language, or maybe just one strong enough of these reasons.\nFor a very long time in my career, C# was my main programming language, I used JavaScript a lot too, but it has always taken a back seat until TypeScript came about, and SPA became the de facto front-end development model. So for 16 years, it has been two languages and a half for me, and I have never felt the need to learn another language (Java in university doesn\u0026rsquo;t count).\nWhy not Haskell or F#? When functional programming became a thing again, I tried to find the right reason to learn F# (or Haskell), but with the explosion of technical information in our industry, time became even more scarce (I have three kids under 5!) and I really needed a stronger reason to spend my time learning a new language. Unfortunately, even with @DanielChambers continuous efforts in converting me :P, I didn\u0026rsquo;t jump to the wagon.\nIt\u0026rsquo;s funny that the reason why I couldn\u0026rsquo;t put the effort was exactly the reason why functional programming itself is compelling; it\u0026rsquo;s the paradigm shift. The paradigm shift was so big that organisations in the I spend most of my time helping couldn\u0026rsquo;t afford to embrace it; 20+ years of OOP meant a lot of investment in education, solutions and patterns, frameworks, and staffing that made it hard to embrace such a change.\nIn my experience with these organisations, there might have been situations where functional languages could have solved a problem better than an OOP one, but the return of investment would have been little in the light of the legacy of these organisation.\nOf course, I am not promoting that organisations should not invest in learning and adopting new technologies; that would be the path to failure! But I\u0026rsquo;m just describing the situation of most of the organisation I worked with.\nThis ruled out the business-need reason for me, and I am left with “learning concepts to adapt to current tools” since passion was not just enough :P. Luckily, I am surrounded by friends who are passionate about functional programming, and I managed to learn from them enough about its benefits and how to bring that to my OOP world. Conversations with these friends and colleagues like Daniel Chambers, Thomas Koster, and attending lectures by professionals like Joe Bahari, have helped me a lot in adopting functional concepts to my C#.\nI Found The Reasons in Go So I stayed on two languages and a half, until last year when I got the chance to work on a project in which we used Kubernetes. Once you step in the Kubernetes world you will realise that Go is the hero language; Kubernetes is written in Go, Helm is written in Go, and the templates Helm uses is based on the Go template engine. Although you can use Kubernetes without learning the Go language, once you want to get a little deeper it feels that learning Go would be an advantage.\nIn addition to that, with Cloud being my main interest, I have been seeing Go used more and more as the language of choice for many of the cloud-native project, products and services.\nDuring the same time, many of my colleagues and Twitter friends have been porting their blogs from database-driven engines like WordPress to static website generators like Jekyll. I have two websites that could benefit from that, 1) my blog emadashi.com 2) and dotnetarabi.com podcast, which I built on ASP.NET and Subsonic ORM of Rob Conery\u0026rsquo;s. My friend Yaser Mehraban kept teasing me and applying his peer pressure until I surrendered, and I finally started looking into it moving my blog and my podcast to a static website generator.\nMy choice was Hugo; to me, it seemed the most mature static site generator with the least amount of churn and learning curve. And guess what, Hugo is written in Go! And the templating engine is based on Go\u0026rsquo;s. Same as Kubernetes, you don\u0026rsquo;t need to learn Go if you want to use Hugo, but it\u0026rsquo;s just another compelling reason to be familiar with the language.\nSo by now, it feels I am surrounded by problems that are being solved with Go, and it\u0026rsquo;s more evident that there is a greater possibility for me to work in Go in the future, even professionally.\nAll this, in addition to the low barrier of entry due to familiarity with C#, encouraged me to jump to the waters.\nWhere did I Start? There are so many ways a person can start learning a language, to me I wanted to learn the language fast and learn just enough to get me going. For this reason, I didn\u0026rsquo;t pick up a book that would take me a while to learn, even though a book is probably the most profound way.\nInstead of picking up a book, I went to https://golang.org and checked what the website has to offer; most of the modern projects and languages have documentation that includes tutorials and Getting Started guide. If these guides are well crafted it would be a great learning boost, and to my luck Go had great content.\nSet-up The first thing I wanted to do is to set up the environment and run the most basic example (the hello world of Go), for that I followed the Getting Started guide. Setting up the environment as a basic step for learning a language is very important; it will give you an understanding of the requirements of the language and will set up some expectation on how friendly the experience is to you, it breaks the ice. Also, it paves the way to the Hands-On step coming soon; I will explain this step later in this article.\nFoundation Now that my environment is setup and I ran my hello world example, I needed to understand what is really going on: how the code compiles, how it runs, how it is packaged, how it is hosted; I needed the foundational concepts to establish a firm ground to base my learning on. Learning the syntax and the various Go features will come along, and it will take time, but you can\u0026rsquo;t postpone the foundations. For this, I followed the “How to Write Go Code” guide. The article\u0026rsquo;s title might not sound too foundational, but the content lays the concepts.\nCruise as you need If this is NOT your first programming language to learn, then you are already familiar with the concepts of structure flow: functions, loops, if clauses,…etc. This gives you a very good advantage to sweep through these swiftly; it\u0026rsquo;s unlikely that these are too different from other languages. A fast run through should be enough to capture anything standing out.\nFor this I used the Tour; there are two great things about the tour: 1) it has a simple navigatable structure 2) it is associated with an online playground where you can experiment and confirm your understanding on the spot. There is a wide range of topics covered in the Tour, some of which I would go through fast, and some I would take my time to comprehend; e.g. Slices can be little confusing compared to arrays in C#.\nNote: Everyone\u0026rsquo;s experience is different, so it will not make sense to list the topics I went through swiftly and the ones I spent time on, use your own experience to judge that for yourself.\nAs for the advanced topics I left out a little until I had a better grasp on the basics of the language; overwhelming yourself with advanced topics at this stage might have a counter effect on your learning.\nHands-On After understanding the basics from the How to Write Go code, and sweeping through the Tour, it was time to have my hands on the language; this is the only way you can really understand and learn a language.\nI needed a problem to solve so I can have a driving purpose. The problem I chose is to import the existing records of DotNetArabi from the database (guests and episodes) to create corresponding Markdown files for the Hugo website, so this was my first program.\nIt\u0026rsquo;s important to understand here that I wasn\u0026rsquo;t 100% on top of things yet (neither now :P), but it was the practical experience that I relied on to grasp the concepts and gain the experience. If you leave the practical side for too long you will find yourself forgetting the basics, or that you are learning too advanced topics that you will rarely use. An iterative approach is very good here.\nSo I gradually built the application; each time I am stuck I\u0026rsquo;d either refer back to the Tour, or google it if it is not covered there (e.g. connecting to a database). In each of these stuck-and-solved situations, I take a moment to make sure I understand the solution and the technique behind it. Copy and paste is absolutely fine as long as you pause and comprehend.\nAdvanced Topics Ok now at this stage I feel like I know the basics, and I am comfortable writing a program without big issues. But at this stage, writing a program in Go would give me very little advantage (if any) over writing it in another language; I am not getting the best out of the language. It\u0026rsquo;s the advanced features that make the difference, things like goroutines and channels by which we achieve concurrency with the least amount of maintenance overhead.\nDon\u0026rsquo;t be afraid of the advanced topics; avoiding it the advanced topic because they might be complicated will jeopardise the value we are getting from learning a language in the first place!\nSo for this, I continued the Tour above for the advanced topics. The playground was of tremendous value as you will need to change things around to confirm your understanding. Also, the Tour has some exercises that will poke your thoughts, I highly advise trying these out! This will not just push you to comprehend the concepts, but it will also expand your horizons for the use cases that you might need these advanced features.\nIt would be great fun and value if you can go back to your pet project and try to implement some of these advanced concepts, and this is what I did. I went back to my application and utilised goroutines to extract the data to the markdown files.\nUnit Testing Leaving unit tests to the end wasn\u0026rsquo;t undermining their value, rather I wanted to focus on the language itself first; test frameworks and push the complexity and the learning curve high enough. My experience from JavaScript stings until now :P.\nThe Best of Go Finally, Go website has a section called “Effective Go“. This section is not really a referential documentation, but it can be very valuable so that you write the Go code as the language has intended it to be like. It provides further context and rounded styling to writing the language in the best form.\nI also here advise to pick and choose the topics, reading the whole thing might be counter-productive.\nClose the Loop, Complete the Picture By now you\u0026rsquo;d think you finished, but this is just the beginning; now is the time to tie things together by revising the language\u0026rsquo;s main characteristics, philosophy, and the greatest advantages.\nIf we look specifically at Go, as our example, this might be things like the simplicity of Go, where there no classes, no inheritance, or generics. Or things like concurrency and how Go deals with State in asynchronous code execution. At this stage, it will be valuable to check the videos, like Sameer Ajmani\u0026rsquo;s talk, and the literature out there that discuss “Why Go“.\nI also found the FAQ in golang.org a valuable resource for some of the justifications and explanations. You should not read this as an article though, pick and choose the topics of interest.\nBut isn\u0026rsquo;t this backward? Shouldn\u0026rsquo;t I learn about these things at the beginning? True, you can learn these at the beginning, but you will not value the claims until you try and put your hands on the problem in practice, until then it will be merely claims in the air. So even if you start with these, you should also revise them and make sure you tie the loop.\nConclusion In my journey to learn Go, I did the following:\n• I had a good reason\n• I established the core concepts\n• I installed the tools and ran the “hello world” program\n• I scanned through the structure flow\n• I put my hands on the code and wrote the first program\n• Read the advanced topics, and used the playground to confirm my understanding\n• Watched more videos on why to use Go and its advantages\nIt\u0026rsquo;s important to say here that choosing a language to adopt for in an organisation involves more than just learning it. If you are in a position to influence a decision just be mindful of that.\nI hopes this helps you out, enjoying coding :).\n","permalink":"https://emadashi.com/2019/08/learning-a-new-programming-language-golang-as-an-example/","summary":"\u003ch2 id=\"summary\"\u003eSummary\u003c/h2\u003e\n\u003cp\u003eThis post explains why and how I learned the Go language. Hopefully this will help you to learn it quickly, or will inspire you on how to learn new languages.\u003c/p\u003e\n\u003ch2 id=\"the-reason-to-learn-a-new-language\"\u003eThe Reason to Learn a New Language\u003c/h2\u003e\n\u003cp\u003eThere can be many reasons why someone would want to learn a new language, the main ones to me are: 1) To solve a current business problem 2) Learn concepts to adapt to current tools 3) For fun and passion. Of course, you can have a mix of these reasons to push you to learn a new language, or maybe just one strong enough of these reasons.\u003c/p\u003e","title":"Learning  a New Programming Language (Go language as an Example)"},{"content":"tldr; I will be streaming on Twitch next Monday (25th of March) at 8:30 Melbourne time (GMT+11), configuring Azure Kubernetes AKS to use RBAC.\nFor a long while, I\u0026rsquo;ve been thinking about streaming live development to Twitch or YouTube. Having spent some time behind the microphone while making DotNetArabi podcast, I can say there is a satisfiying feeling in producing content in a media format through which you can connect with the audience.\nWhy not just offline video? I could just record an offline video and host it on YouTube, and it\u0026rsquo;s definitely a valuable medium. The problem with educational videos, specifically, is that it is a one-way communication channel, and without the entertainment factor, unlike movies, these videos can be daunting, imprisoning, and hard to follow.\nThe magic of live streaming But with live streaming magic happens; it adds additional dimensions that make it more appealing:\nIt\u0026rsquo;s LIVE! It\u0026rsquo;s happening NOW, and this means couple of things: it implicitly has the anticipation factor; things are still happening and it might take interesting turns, just like live sports. In addition to that, by sharing the time span during which the event is happening, the audience gets the feeling of involvement and “I was there when it happened”, even if the audience didn\u0026rsquo;t directly interact with the broadcaster. It\u0026rsquo;s real and revealing: When I was doing my homework preparing for this, I talked to my colleague Thomas Koster, and when I asked him about what could interest him in live streaming, his answer was: \u0026hellip;It\u0026rsquo;s probably more the real time nature of it that appeals – to see somebody\u0026rsquo;s thought processes in action, as long as the broadcaster doesn\u0026rsquo;t waste too much time going around in circles. For example, watching somebody figure out a puzzle solution in the game The Witness in real time is much more interesting and valuable than watching a rehearsed, prepared performance of only the final solution.\nThis is the ultimate stage for a developer broadcaster; it requires a lot of bravery and experience. I\u0026rsquo;d love to be able to do this soon, but it\u0026rsquo;s really the 3rd reason below that drew me to streaming.\nIt\u0026rsquo;s two-way communication: the interactive communication between the broadcaster and the audience brings the video to life. It provides timely opportunity to get the best out of this communication, whether it was by the audience correcting the broadcaster, or the broadcaster being available for immediate inquiries. Specifically for this last reason, I became interested in live streaming; I want this relation with my audience; to have a collaborative experience where value is coming from everyone and going in all directions.\nSo, I am doing my first stream! I have been following Jeff Fritz @csharpfritz and Suz Hinton @noopkat and greatly inspired by their amazing work! Also @geoffreyhuntley have started his journey and gave me the last nudge to jump into this space. I\u0026rsquo;ve learned a lot from Suz\u0026rsquo;s post “Lessons from my first year of live coding on Twitch“, and recently Jeff\u0026rsquo;s “Live Streaming Setup – 2019 Edition” (don\u0026rsquo;t let it scare you, you don\u0026rsquo;t have to do it all!).\nMy next stream will be about Role Based Access Control (RBAC) in Azure Kubernetes AKS, I will walk you through RBAC, OAuth2 Device Flow, and how this works within Azure AKS, with hands-on live deployments and configuration.\nWhat is my goal, and what is not? What I am trying to achieve here is two-way communication through the session I have with my audience, that\u0026rsquo;s it.\nAm I going to do this constantly now? Actually, I don\u0026rsquo;t know! To me this is an experiment; I might keep doing it, or this might be my first AND LAST stream, let\u0026rsquo;s see what the future brings. 🙂\n","permalink":"https://emadashi.com/2019/03/rbac-azure-kubernetes-service-aks-twitch/","summary":"\u003cp\u003e\u003cem\u003etldr; I will be streaming on Twitch \u003ca href=\"https://www.twitch.tv/events/P59QGEbtTRahQ-4_T3bG-A\"\u003enext Monday (25th of March) at 8:30 Melbourne time (GMT+11)\u003c/a\u003e, configuring Azure Kubernetes AKS to use RBAC.\u003c/em\u003e\u003c/p\u003e\n\u003cimg loading=\"lazy\" decoding=\"async\" class=\"alignright wp-image-639\" src=\"/wp-content/uploads/2019/03/twitch-logo.jpg\" alt=\"Twitch logo\" width=\"280\" height=\"157\" srcset=\"/wp-content/uploads/2019/03/twitch-logo.jpg 474w, /wp-content/uploads/2019/03/twitch-logo-300x168.jpg 300w\" sizes=\"(max-width: 280px) 100vw, 280px\" /\u003e \n\u003cp\u003eFor a long while, I\u0026rsquo;ve been thinking about streaming live development to \u003ca href=\"https://twitch.tv\"\u003eTwitch\u003c/a\u003e or \u003ca href=\"https://youtube.com\"\u003eYouTube\u003c/a\u003e. Having spent some time behind the microphone while making \u003ca href=\"https://dotnetarabi.com/\"\u003eDotNetArabi\u003c/a\u003e podcast, I can say there is a satisfiying feeling in producing content in a media format through which you can connect with the audience.\u003c/p\u003e","title":"RBAC in Azure Kubernetes Service AKS on Twitch!"},{"content":"In this post, I explain how I fixed the “mixed content” security issue when using Cloudflare Flexible SSL, and IIS Rewrite.\nI Run Two Websites Under One Account Using IIS Rewrites I have two websites that are hosted under one account with my hosting provider (I know!): https://emadashi.com and https://dotnetarabi.com. The way I do it is that is by using IIS Rewrite rules in my web.config; any request that is targeting one of these domains, I “rewrite” the URL so it is pointing to the sub-directory to serve the request. This changes where the file is served from, but does not change the request URL to the user.\nHowever, if by any chance a request came to the server targeting the sub-directory itself, that page will still be served as is, which is not desirable as I don\u0026rsquo;t want to expose the inner of my websites; it\u0026rsquo;s ugly and bad for my websites\u0026rsquo; URL discovery. In this case, first I want to “redirect” the user to point to the domain without the sub-directory; and then run the rewrite rule as mentioned above, which I did.\nIn psudo, when a request comes the execution of the rules looks like this:\nRule1: Does the URL include a sub-directory? If so then Redirect to the same URL without the sub-directory. Rule2: The URL does not include the sub-directory, so Rewrite (not Redirect) to the sub-directory. I want to Serve My Websites Over HTTPS, But… Now when I wanted to secure my websites and start using HTTPS to serve requests, thanks to Troy Hunt\u0026rsquo;s continuous nagging :P, I couldn\u0026rsquo;t just use normal certs with my hosting due to the way I am running it. So again, based on Troy Hunt\u0026rsquo;s awareness efforts, I used Cloudflare\u0026rsquo;s Flexible SSL free service.\nThis went fine until I discovered that engine of dotnetarabi generated guests images\u0026rsquo;s URLs including the sub-directory. When I open dotnetarabi over HTTP, the first request to these URLs is HTTPS, but of course containing the sub-directory, the second request though (which is a redirect to the URL without the sub-directory) is always coming back as HTTP! This caused the known “unsecure; mixed content” problem.\nSimply, the reason is that:\nWith Flexible SSL, Cloudflare communicates to your server view HTTP ALWAYS; you don\u0026rsquo;t have certs, this is why you need them in the first place! Cloudflare Flexible SSL doesn\u0026rsquo;t force HTTPS if you haven\u0026rsquo;t explicitly asked it to (via the Always Use HTTPS option). So if the request came view HTTP, it will pass it through as HTTP. So in the the case of my redirects above, what happens is the following:\nThe request comes to Cloudflare via HTTPS, the URL include the sub-directory The request is forwarded to my server via HTTP (NOT HTTPS!) to the sub-directory My server innocently redirects the request to the URL without the sub-directory, but using the same protocol the current request is using, which is HTTP because it will always be! The user receives the redirection to the new URL, but with the HTTP protocol this time, and then Cloudflare just passes it through because it does not force HTTPS. The solution The trick was that it\u0026rsquo;s true that Cloudflare does not use HTTPS when it forwards the request to your server, but what it does is that it adds the header X-FORWARDED-PROTO=https to the requests to your server if the original request was using HTTPS.\nSo, all what I needed to do is to check on this header in my redirects; if it exists then redirect to HTTPS, otherwise redirect to HTTP:\nThe Action part of my rule:\n\u0026lt;action type=\u0026#34;Redirect\u0026#34; url=\u0026#34;{MapSSL:{HTTP_X_FORWARDED_PROTO}}dotnetarabi.com/{C:1}\u0026#34; appendQueryString=\u0026#34;true\u0026#34; logRewrittenUrl=\u0026#34;false\u0026#34; /\u0026gt; \u0026lt;rewriteMaps\u0026gt; \u0026lt;rewriteMap name=\u0026#34;MapSSL\u0026#34; defaultValue=\u0026#34;https://\u0026#34;\u0026gt; \u0026lt;add key=\u0026#34;https\u0026#34; value=\u0026#34;https://\u0026#34; /\u0026gt; \u0026lt;add key=\u0026#34;http\u0026#34; value=\u0026#34;http://\u0026#34; /\u0026gt; \u0026lt;/rewriteMap\u0026gt; \u0026lt;/rewriteMaps\u0026gt; ","permalink":"https://emadashi.com/2019/03/cloudflare-flexible-ssl-with-iis-rewrites/","summary":"\u003cp\u003eIn this post, I explain how I fixed the “mixed content” security issue when using \u003ca href=\"https://www.cloudflare.com/integrations/wordpress/free-ssl-certificate-wordpress/\"\u003eCloudflare Flexible SSL\u003c/a\u003e, and IIS Rewrite.\u003c/p\u003e\n\u003ch2 id=\"i-run-two-websites-under-one-account-using-iis-rewrites\"\u003eI Run Two Websites Under One Account Using IIS Rewrites\u003c/h2\u003e\n\u003cp\u003eI have two websites that are hosted under one account with my hosting provider (I know!): \u003ca href=\"https://emadashi.com\"\u003ehttps://emadashi.com\u003c/a\u003e and \u003ca href=\"https://dotnetarabi.com\"\u003ehttps://dotnetarabi.com\u003c/a\u003e. The way I do it is that is by using IIS Rewrite rules in my web.config; any request that is targeting one of these domains, I “rewrite” the URL so it is pointing to the sub-directory to serve the request. This changes where the file is served from, but does not change the request URL to the user.\u003c/p\u003e","title":"Fix “Mixed Content” When Using Cloudflare SSL And IIS Rewrites"},{"content":"In a small project, I was trying to utilize an existing PowerShell I had, and host it in Azure Functions; I needed to understand how HTTP binding work with PowerShell Azure Functions as I didn\u0026rsquo;t want to rewrite my script to C# just because the PowerShell Azure Functions had the “(Preview)” appended to its name.\nI wanted the Function to return a plain text response to an HTTP trigger based on a query parameter (this is how Dropbox verifies Webhook URLs). So, naively, I followed the basic template as an example:\nWrite-Output \u0026#34;PowerShell HTTP function invoked\u0026#34; if ($req_query_name) { $message = \u0026#34;$req_query_name\u0026#34; } else { $message = \u0026#34;wrong!\u0026#34; } [io.file]::WriteAllText($res, $message) The first question I had was “how is the querystring parsed?” I assumed that I should replace “req_query_name” with the querystring key in the request, should I replace the whole thing to become $myQueryParam? This is when I decided to look in the source code rather than the documentation.\nNote: I try to link back to the source code wherever I can, the problem is the link does not include the commit ID, so next to the link I put the commit ID at which the file was in that state.\nHTTP Binding There are different phases that take place during a Function execution, in this post I will skip the details of how the binding is loaded, and only concentrate on how the HTTP binding operates within a PowerShell Function.\nInput When the Azure Functions runtime receives an HTTP message for PowerShell script that has HTTP binding, it parses the message according to the following:\nThe body of the HTTP request will be saved to a temp file, the path of the temp file will be assigned to an environment variable that matches the “Name” property of the input binding configuration. If we take the following JSON as an example for our “function.json” configuration, then the name of the variable will be “req“: { \u0026#34;bindings\u0026#34;: [ { \u0026#34;name\u0026#34;: \u0026#34;req\u0026#34;, \u0026#34;type\u0026#34;: \u0026#34;httpTrigger\u0026#34;, \u0026#34;direction\u0026#34;: \u0026#34;in\u0026#34;, \u0026#34;authLevel\u0026#34;: \u0026#34;function\u0026#34; }, { \u0026#34;name\u0026#34;: \u0026#34;res\u0026#34;, \u0026#34;type\u0026#34;: \u0026#34;http\u0026#34;, \u0026#34;direction\u0026#34;: \u0026#34;out\u0026#34; } ], \u0026#34;disabled\u0026#34;: false } (This happens here at dcc9e1d)\nThe original URL will be saved in environment variable “REQ_ORIGINAL_URL“. The HTTP request method will be saved in environment variable “REQ_METHOD“. For each HTTP header “key”, a corresponding environment variable “REQ_HEADERS_key” will be created The full querystring will be saved in environment variable “REQ_QUERY“, it will also be further parsed into individual variables; for each query string “key”, a corresponding variable “REQ_QUERY_key” will be created. All of this happen before the execution of the Function, so once the Function is invoked these variables are already available for consumption. (This happens here at dcc9e1d ).\nTo read the body of the request you just read it as you read any file PowerShell, and then you parse it according to the content; so if the body of the request is JSON you read the file and parse it to JSON like the following:\n$mycontent = Get-Content $req | ConvertFrom-Json Note: If the Function is executing because of a Triggered bindings (such as HTTP), the rest of the input bindings are skipped. (Check the code here at commit dcc9e1d) Output Similar to the request, your script should write the response to a file, which in turn will be read by the Azure Functions runtime, and then will pass it to the HTTP output binding to send it on your behalf . The runtime will also assign the path of this file to an environment variable that matches the Name property you define in the output binding in the function.json.\nSo for the example above of function.json, you will write the content of your response to the file whose path is stored in “res”:\n[io.file]::WriteAllText($res, $message) This happens here at commit dcc9e1d.\nDefault Behaviour Now, if the content you write to the file is a string that cannot be parsed to JSON, then: it will be considered as the body of the HtttpMessage, the response will have the default HTTP content-type “application/json”, and it will be run through the default MediaTypeFormatter. Take the following as an example:\nFunction:\n$message = \u0026#34;This is a text\u0026#34; [System.IO.File]::WriteAllText($res,$message) Result:\nContent-Type: application\\json \u0026#34;this is a text\u0026#34; Notice that the text written to the file in the script is without quotes, but the result in the response body is in double quotes; this is because the default content-type of the response is “application/json”, and the HTTP binding will format it accordingly and wrapp in double quotes.\nMore Control If we want more control over the response then you have to write JSON object to the file, this JSON object will hold all the information on how the response should look like: the headers, the body, and the response status.\nThe JSON object should contain the properties: “body“, “headers“, “isRaw” (more about it below), and “statusCode” (int) if you want to change any. For example, if I want the content of the response to be simple text with plain/text content-type , then the script should write the following:\n$message = \u0026#34;{ `\u0026#34;headers`\u0026#34;:{`\u0026#34;content-type`\u0026#34;:`\u0026#34;text/plain`\u0026#34;}, `\u0026#34;body`\u0026#34;:`\u0026#34;$name`\u0026#34;}\u0026#34; [System.IO.File]::WriteAllText($res,$message) There are several points that need to be brought up:\nIf the “body” property exists, then only the value of the “body” property will be in the HttpMessage body, otherwise the whole content of the JSON object will be in the HttpMessage body. Up until the time of writing this post, Azure PowerShell functions runs under PowerShell 4.0, this means that if you want to use the Out-File command to write to the file, then it will always append a new line feed (\\r\\n) at the end of the string, even if you supply the -NoNewLine parameter! Use the WriteAllText command instead. The parsing can be found here at commit 3b3e8cb.\nFormatters Great, so far we managed to change the body, the headers (including the content-type), and the status of the response. But this is also not enough; depending on the content-type header, the Azure Functions runtime will find the right MediaFormatter for the content and format the response body with the right format.\nThere are several types of MediaFormatters in the System.Net.Http.Formatting library: JsonMediaTypeFormatter, FormUrlMediaFormatter, XmlMediaTypeFormatter, and others. The issue with the formatters is that it might add the UTF-8 Byte Order Mark (BOM) at the beginning of the content. If the recipient is not ready for this it might cause a problem.\nDropbox, for example, provides a way to watch the changes to a file through their API by registering a webhook, and the way Dropbox verifies the webhook is by making a request to the endpoint with a specific querystring, then it expects the webhook to respond by echoing the querystring back. When I created my Function I didn\u0026rsquo;t change anything, thus the runtime used the default formatter and appended the UTF-8 BOM characters (0xEF,0xBB,0xBF) to the beginning of the body, which of course was revoked by Dropbox.\n_The way to skip these formatters is by setting the “isRaw” property mentioned above to true. For example, the following script will write a plain text “emad1234” to the response:\n_\n$message = \u0026#34;{ `\u0026#34;headers`\u0026#34;:{`\u0026#34;content-type`\u0026#34;:`\u0026#34;text/plain`\u0026#34;}, `\u0026#34;body`\u0026#34;:`\u0026#34;emad1234`\u0026#34; }\u0026#34; Taking a screenshot from Fiddler from the HexView view, the response look like this:\nHave you noticed the characters I surrounded with the red box? that\u0026rsquo;s the BOM, displayed as “ï»¿“.\nBut once we add the “isRaw” property like this:\n$message = \u0026#34;{ `\u0026#34;isRaw`\u0026#34;: true, `\u0026#34;headers`\u0026#34;:{`\u0026#34;content-type`\u0026#34;:`\u0026#34;text/plain`\u0026#34;}, `\u0026#34;body`\u0026#34;:`\u0026#34;emad1234`\u0026#34; }\u0026#34; The result will be without the BOM:\nThis can be found here at commit 3b3e8cb.\nFinal Notes It\u0026rsquo;s worth mentioning that Azure Functions runtime also provides content-negotiation feature, and you can leave it to the request to decide.\nAnother departing thought is that of course you don\u0026rsquo;t have to craft your JSON object by concatenating strings together, you can use PowerShell arrays and hashtables to do that, check the articles here and here.\nFinally, isn\u0026rsquo;t it awesome to be able to see that in the source code!\nConclusion PowerShell probably is the language that got the least love from the Azure Functions team, but this does not mean that you throw your scripts away, hopefully with the tips in this post you will find a way to use them again.\n","permalink":"https://emadashi.com/2017/04/httpbindingforpowershellazurefunctions/","summary":"\u003cp\u003eIn a small project, I was trying to utilize an existing PowerShell I had, and host it in Azure Functions; I needed to understand how HTTP binding work with PowerShell Azure Functions as I didn\u0026rsquo;t want to rewrite my script to C# just because the PowerShell Azure Functions had the “(Preview)” appended to its name.\u003c/p\u003e\n\u003cp\u003eI wanted the Function to return a plain text response to an HTTP trigger based on a query parameter (this is how Dropbox verifies Webhook URLs). So, naively, I followed the basic template as an example:\u003c/p\u003e","title":"HTTP Binding in PowerShell Azure Functions"},{"content":" نشأ دوت نت عربي منذ ثمان سنوات ليكون من أوائل المواقع العربية التي تقدم محتوى عربيا ذا جودة عالية، قدم من خلالها العديد من الحلقات مع نجوم تقنيين عرب أصحاب خبرة طويلة و أداء مميز. بدأ البودكاست بجهود فردية و نفقة شخصية غير ربحية، و استمر عدة سنوات بأداء جيد و بمعدل حلقة كل أربعة أسابيع و بشكل مستمر. و لكن خلال السنتين السابقتين بدأ إصدار الحلقات بالتباطئ و باتت الفترة بين الحلقة و الأخرى تطول على الرغم من كل محاولات زيادة الانتاج. فكرة إخراج العمل من دائرة العمل الفردي إلى دائرة العمل الجماعي لم تغب عني و منذ سنوات، لكن لم أستطع إيجاد آلية واضحة و عملية يمكن الاعتماد عليها لتحويل العمل من فردي إلى جماعي تطوعي، و يمكن من خلالها اغتنام ما قدمه بعض المستمعين المخلصين من رغبة في المشاركة في هذا العمل. استمر الأمر كما هو عليه حتى كان لا بد من الخوض في فكرة العمل الجماعي التطوعي حتى و لو بأبسط الأدوات. و “أن تأت متأخرا خيرا من أن لا تأت”. و بناء على هذا، و بناء على استشارة بعض الأصدقاء و الأصحاب، أود أن أفتح باب المشاركة في دوت نت عربي لإنتاج الحلقات بشكل أسرع و بجودة عالية. لتسهيل عملية المشاركة لا بد من شرح عملية إنتاج الحلقات و سرد الخطوات، و بالتالي سيسهل على المتطوع اختيار ما يمكن المساهمة به. خطوات الإنتاج أولا: إيجاد الضيف المناسب في هذه الخطوة أقوم بالبحث عن ضيف مناسب للبرنامج. يتطلب من الضيف أن يكون صاحب خبرة في مجاله، و الطرق المتاحة لإثبات هذا هي:\n• البحث عن إصدارات و منشورات للضيف مثل مدونة أو مقالات ذات جودة عالية.\n• البحث عن مساهمات للضيف على موقع GitHub.\n• حيازته على منصب تقني متقدم في شركته\n• أو أن يتم التدليل عليه من شخص موثوق بشكل مباشر\nلا بد من التنويه هنا أننا لا نحصر الحرفية في من حاز هذه المناصب أو الإنجازات، فهناك الكثير من المحترفين الذين لم تسنح لهم الفرصة للقيام بهذه الأعمال، لكن بالنسبة لدوت نت عربي هذه هي الطريقة المتاحة للتأكد من قدرة الضيف. فمن يرغب بالتطوع لهذه المهمة سيقوم بالبحث عن الضيف و من ثم سيطلعني على بعض الروابط التي وجدها التي تسرد إنجازات الضيف. يجدر بالذكر أن هذه الخطوة مفتوحة للجميع دون الحاجة لتنسيق. ثانيا: ترتيب الموعد في هذه الخطوة أقوم بالاتصال بالضيف و إخباره عن دوت نت عربي، و أعرض عليه بتسجيل حلقة معه. إن قبل الضيف نشرع بترتيب موعد لتسجيل الحلقة و طرح النقاط المحورية في الحلقة المرتقبة. ثالثا: تسجيل الحلقة في هذه الخطوة يتم تسجيل الحلقة مع الضيف من خلال سكايب Skype. في الخطوتين السابقتين: “ترتيب الموعد” و “تسجيل الحلقة” أظنه من الصعب أن يقوم بهذه الخطوة غير مقدم البرنامج. رابعا: الإنتاج الفني بعد تسجيل الحلقة ينتج ملف صوتي MP3 يحتاج لمعالجة، و هي تتضمن ما يلي:\n• قص المقاطع التي فيها أخطاء و عثرات و إطالات غير مرغوبة مثل: “آااااا”\n• تحسين جودة الصوت من خلال تصفيته بالمصفيات الصوتية التقنية\n• إنشاء ملف MP3 جديد و تعديل خصائصه مثل عنوان الملف، و الأيقونة، و غيرها. تتطلب هذه الخطوة بعض الفنيات، لا تحتاج الكثير من العلم لكن تحتاج إلى الممارسة. و لذلك فإنه من المتوقع أن أقوم بتدريب المتطوع على كيفية الإنتاج، و أن تتم مراجعة الحلقات الأولى بشكل دقيق قبل تسليم المهمة بشكل تام. خامسا: نشر الحلقة تتضمن هذه الخطوة رفع ملف الـ MP3 إلى الموقع، و كتابة المقدمة عل الموقع، و نشر الخبر على مواقع التواصل الاجتماعي. و هذه الخطوة أيضا تتضمن بعض المعلومات التقنية، سأساعد من يتقدم لهذه المهمة في البداية بالتأكيد. و بهذه الخطوات الخمس تتم الحلقة و يبدأ المشوار بحلقة أخرى. آلية التعاون سيسرد المتطوع المهام التي يرغب بالتطوع لها، و قد يتقدم لنفس المهمة عدد من المتطوعين. بناء على ذلك سيكون لكل حلقة تنسيق مختلف يعتمد على جدول المتطوع و قدرته على توفير الوقت. الأداة التي اخترتها لتنسيق هذه الخطوات بين المتطوعين هي تريللو trello.com و هي أداة مبنية على فكرة ما يقال له “لوح كانبان Kanban Board” حيث سيكون لكل حلقة بطاقة تنتقل بين الخطوات التي ستمثل على شكل عمدان على هذا اللوح. سيتاح لكل متطوع التقاط بطاقة في عامود خطوة معينة يرغب في العمل بها، سيسندها لنفسه حتى إنهاء العملية ثم يدفعها لعامود الخطوة التالية، و هكذا. “ما الفائدة التي سأحصل عليها إن تطوعت؟” و قد يسأل سائل: “ما الفائدة التي سأحصل عليها إن تطوعت؟”، إضافة إلى إسهامك في تنمية معلومات الآخرين و إثراء المحتوى العربي على الإنترنت، سيتم شكر كل من يتطوع للمشاركة في هذا العمل، و بما أن دوت نت عربي ليس مؤسسة ربحية سيكون الشكر بذكر كل من شارك في إصدار الحلقة في ملخص الحلقة على الموقع. ماذا الآن؟ إذا كنت ترغب في المشاركة في إنتاج حلقات دوت نت عربي أرسل رسالة إلى: “emad.ashi” على بريد الـجيميل GMail، و سيتم الترتيب معك و شرح ما لم يتسن شرحه في هذا المقال. و إن لم ترغب في المشاركة و كان لديك أي نصيحة أو تعليق أو نقد فرجاء لا تترد بإرساله أيضا. شكرا لكم على اهتمامكم و لنبق على اتصال. ","permalink":"https://emadashi.com/2016/10/%D9%85%D8%B3%D8%A7%D8%B9%D8%AF%D8%A9-%D9%81%D9%8A-%D8%AF%D9%88%D8%AA-%D9%86%D8%AA-%D8%B9%D8%B1%D8%A8%D9%8A/","summary":"\u003cdiv dir=\"rtl\"\u003e\n  \u003cp\u003e\n    نشأ دوت نت عربي منذ ثمان سنوات ليكون من أوائل المواقع العربية التي تقدم محتوى عربيا ذا جودة عالية، قدم من خلالها العديد من الحلقات مع نجوم تقنيين عرب أصحاب خبرة طويلة و أداء مميز. بدأ البودكاست بجهود فردية و نفقة شخصية غير ربحية، و استمر عدة سنوات بأداء جيد و بمعدل حلقة كل أربعة أسابيع و بشكل مستمر.\n  \u003c/p\u003e\n  \u003cp\u003e\n    و لكن خلال السنتين السابقتين بدأ إصدار الحلقات بالتباطئ و باتت الفترة بين الحلقة و الأخرى تطول على الرغم من كل محاولات زيادة الانتاج. فكرة إخراج العمل من دائرة العمل الفردي إلى دائرة العمل الجماعي لم تغب عني و منذ سنوات، لكن لم أستطع إيجاد آلية واضحة و عملية يمكن الاعتماد عليها لتحويل العمل من فردي إلى جماعي تطوعي، و يمكن من خلالها اغتنام ما قدمه بعض المستمعين المخلصين من رغبة في المشاركة في هذا العمل. استمر الأمر كما هو عليه حتى كان لا بد من الخوض في فكرة العمل الجماعي التطوعي حتى و لو بأبسط الأدوات. و “أن تأت متأخرا خيرا من أن لا تأت”.\n  \u003c/p\u003e","title":"مساعدة في دوت نت عربي"},{"content":"Such a fancy title ha, probably the influence of our industry (bad influence)! Well you can just substitute it with something like “These are the stages of productivity between which the satisfaction jumps in exponential magnitudes”.\nNote: before we check these stages out, it goes without saying that all the “he” in this article are absolutely replaceable with “she”; it\u0026rsquo;s just that the “he/she” style is too verbose.\n0. Ignorance In this stage the individual doesn\u0026rsquo;t know what he is missing , he does not add any value to himself or the community; he enjoys “time-waste” activities, or watching TV YouTube. Indeed there is joy in being a couch potato, but it is negligible compared to the next levels, which he hasn\u0026rsquo;t experienced yet, thus explains why I gave it the number 0.\nNote that I am not talking about planned recreation activities after productive accomplishments, I am talking here about this kind of activity as being THE activity the individual\u0026rsquo;s time is mostly spent on.\nAlso note that I am not trying to degrade anyone here; people might be in this stage due to circumstances out of their control, or because they haven\u0026rsquo;t tasted the satisfaction of the next levels.\n1. Knowing In this stage the individual learns something new; he watches documentaries, reads books, …etc., the satisfaction of “knowing” tingles the brain with every new piece of knowledge acquired. It\u0026rsquo;s an intrinsic part of humans\u0026rsquo; nature as beings of intellectual.\nThis is where the majority of people are, and usually stuck; the number of books read become the gauge of the individual\u0026rsquo;s pride, not the utilization of the value gained from reading these books.\n2. Sharing Reading books is not enough at this stage; there is an overflow of excitement that is spilling over and around, the minute he sees the others\u0026rsquo; reactions when he shares the knowledge the satisfaction doubles, he would look for every occasion at which he can cultivate the excitement of passing the knowledge.\nNonetheless, it\u0026rsquo;s important to understand sharing knowledge at this level is limited to one-to-one interactions, maximum to a group of friends on a hangout.\n3. Doing The individual has read about his favorite topic too much, he also talked about it to others a lot, e.g. he loves carpentry, he loves reading about it, visiting galleries, appreciating carpenters at work,… now what? He starts doing; he takes the first step in transforming this knowledge to action: he buys the tools, and he starts working on his first piece.\nHe also discovers how difficult it is, he might hit some frustrations, but he keeps going on small but steady steps, until he creates his first piece! Once he finishes, the satisfaction is indescribable! He keeps looking at it, in his mind it echoes: “this is me, I did this!”, “this piece of art didn\u0026rsquo;t exist before I started working it”, “this solution solves that problem I had”, “I added value”.\nThis phase, though, is very difficult to step into, and there are several reasons why:\nIt\u0026rsquo;s not easy to be discovered; the majority of people are not doing it, it doesn\u0026rsquo;t occur to him that there is more than sharing, and that there is a greater satisfaction from just knowing. Lack of self-confidence: even if it occurs to him that doing could be much more satisfactory, he does not have the confidence in himself to take the action. Doing can be difficult, expensive, and can require effort and sacrifice. It\u0026rsquo;s not always easy to do depending your circumstances, or the field you are in, e.g. programming; it\u0026rsquo;s definitely more accessible to start an Open Source project than be involved in nuclear physics lab to try something out. Being the most difficult stage to get into, I have to stop here, give a little push and help if I can. I tell you with a very loud and clear slow voice: “IF YOU ARE NOT DOING, YOU ARE MISSING!”, and I am not going to try the “stop procrastinating” or “just do it” style, it\u0026rsquo;s up to you but you are missing a lot! When you decide between flipping through a game on your mobile, or opening your development IDE, remember that you are giving away a joy that is in magnitudes greater than the joy of playing a game of Sudoku.\n4. Influencing He did, and did , and did more, now he starts presenting in User Groups, he writes about it in his blog, and he teaches it. He thought that the ultimate joy was by doing, but he was wrong; he started seeing others doing because he showed them the path, because he helped, because he provided so much value that it started influencing others to do and add value themselves…BOOM! New level of joy.\nThis also gives him a boost of endurance and patience to support others; he is happy when he receives an inquiry email or when someone approaches his desk with a consultancy. The success of others become his success.\n5. Scaling What can be after influencing? I can only assume Scaling: in this stage, he probably wrote a book, or became an thought leader, or an international speaker, now he is a public figure. And no no…it\u0026rsquo;s not the fame I am talking about, it is the notion of the unquantified accumulation of values he added to so many people, a value so big in momentum that brings satisfaction and joy equal to the sum of all of the satisfaction and joy he brought to people by his influence. He bumps into people he never met and they thank him for what he did to them!\nFinally, remember that learning never stops, check which stage you are at, and know that there is much more satisfaction in the next, in a nutshell: satisfaction is just a synonym to adding a value.\n","permalink":"https://emadashi.com/2016/08/productivity-satisfaction-maturity-levels/","summary":"\u003cp\u003eSuch a fancy title ha, probably the influence of our industry (bad influence)! Well you can just substitute it with something like “These are the stages of productivity between which the satisfaction jumps in exponential magnitudes”.\u003c/p\u003e\n\u003cp\u003e\u003cem\u003eNote: before we check these stages out, it goes without saying that all the “he” in this article are absolutely replaceable with “she”; it\u0026rsquo;s just that the “he/she” style is too verbose.\u003c/em\u003e\u003c/p\u003e\n\u003ch2 id=\"0-ignorance\"\u003e0. Ignorance\u003c/h2\u003e\n\u003cp\u003eIn this stage the individual doesn\u0026rsquo;t know what he is missing , he does not add any value to himself or the community; he enjoys “time-waste” activities, or watching \u003cdel\u003eTV\u003c/del\u003e YouTube. Indeed there is joy in being a couch potato, but it is negligible compared to the next levels, which he hasn\u0026rsquo;t experienced yet, thus explains why I gave it the number 0.\u003c/p\u003e","title":"Productivity Satisfaction Maturity Levels"},{"content":"Yes, I\u0026rsquo;ve been hacked, and it wasn\u0026rsquo;t fun! In this post I will go through some of the lessons learned. But before that, let\u0026rsquo;s shed some light on what happened.\nIt began when a friend of mine notified me that my DotNetArabi blog, which is WordPress blog, has new suspicious and unrelated posts. I rushed to my admin page, deleted these posts, and then changed my password to a stronger one.\nI wasn\u0026rsquo;t so much afraid of the impact; after all this is an Arabic podcast blog while the posts were English. In addition to that, most likely the audience who saw these posts are few (since the posts were recent), and those who saw it would excuse me and understand that something went wrong (I like my audience :P).\nAfter deleting these posts I also thought maybe I should check my folders and files, and indeed when I did, I found that there are hundreds and hundreds of files that aren\u0026rsquo;t part of WordPress files, most of them created in a single day. Deleting these wasn\u0026rsquo;t as easy as deleting the posts though; they were many files, they were in different folders, I didn’t know all the WordPress files to distinguish them from these files, my host provider does not provide file management system, and the files didn\u0026rsquo;t have much in common to find a single rule to delete them by (maybe the date was a good indicative, but wasn\u0026rsquo;t good enough).\nFair enough, since the harm is quarantined for now (or so I thought!), I decided to take this task on ease by deleting these files in bunches, this decision was also influenced by the fact that FileZilla kept disconnecting; I couldn\u0026rsquo;t just select many suspicious files and delete them.\nDays pass by and I receive an email from my host provider informing me that I have been a victim to a hack; the email listed couple of files as a sample of many files (_the_ files) that are sending spam to others. I already knew about the files, but I didn\u0026rsquo;t know about the “sending spam” part, of course I should have known better; why would these files exist in the first place?! Duh!\nAnyway, my host provider urged me to take action but he didn\u0026rsquo;t mention any thing about taking measures if I don\u0026rsquo;t, so I kept doing what I was doing: deleting files on ease, even though that I have received probably another same email or two from my host provider.\nA week or so after, my Google Analytics numbers flattened to 0! being lazy (actually I was in the middle of moving houses so I shouldn\u0026rsquo;t bash myself here :P) I didn\u0026rsquo;t check what the reason was; I thought I can check it in couple of days, maybe it was the mobile app I am using to read my analytics rather than the analytics themselves.\nAnd then a different email reaches my inbox: “your website have been suspended for the last 3 days because it\u0026rsquo;s been a source of spam”! This is when I freaked out; it\u0026rsquo;s true that I don\u0026rsquo;t make money of the hits to my blog, but being down for that long is bad bad bad for reputation.\nI instantly sent them an email explaining to them how angry I was because of their inadequate notification/action protocol; their initial notifications didn\u0026rsquo;t mention any threat of closing down the website, and their last notification of closing down the website came 4 days after they have closed it down!\nI demanded them to put it up again ASAP, but I also promised to remove the malicious files. They refused! No go live again before we delete all the files.\nBeing under the pressure, I had to try all sorts of stuff, to the extent that I tried the Windows Explorer\u0026rsquo;s built-in FTP client, and to my surprise, it worked better than FileZilla! I was happy seeing that green progress bar deleting all these awful files. After I made sure I have deleted everything that looked suspicious to me, I sent the host provider an email again informing them that everything is fine now and my website is ready to go up again (yes, they don\u0026rsquo;t have chat-support, only email).\nHours and hours later, I receive an email from them again saying that I still have malicious files and “Here is a sample”, the website will not be up until this is solved. This time, though, they provided me with two options: either deleting the whole website and uploading from a backup I have (which is potentially infected as well), or pay for a service on hourly basis to fix the problem for me.\nI decided to go with the first option first, but rather than deleting the whole website, I asked them to delete the suspicious folder only. Hours and hours after we managed to do this, and finally my website is up again (I went through more problems after that but maybe we can save this for the list of lessons below).\nNot a short story looking at the narration above, now let\u0026rsquo;s look into the lessons learned and how I can relate things together.\nYou have a website? You are already a target Security hasn\u0026rsquo;t been something I neglected, but it was something that I miscalculated; the hacked part of my website was my podcast DotNetArabi\u0026rsquo;s blog, and my thinking has always been “Why would someone hack my podcast blog? My audience is very specific; it does not host any sensitive information, the ROI of hacking it is little compared to other sites…, so the possibility of being a victim of hacking is very minimal.\nBut they weren\u0026rsquo;t after my website, the content, or my audience; they were after the resources on which my website runs on! My website became a platform to annoy others. I agree, I should\u0026rsquo;ve known better, but the comfort of not doing a lot to secure my website along with the “low possibility” of being a target made me feel good about not securing my website!\nDo you have a website that you manage? GO SECURE IT NOW!! Do all what is necessary to secure it, if it is a WordPress blog check the points below, if not look how to secure it. YOU ARE A TARGET…RUN… NOW!\nDon\u0026rsquo;t be Lazy One of the reasons why I ended up in a bad situation is that I was a little lazy; I know I was moving houses and was too busy, but I also knew about having the malicious files before, and I took it easy, tsk tsk tsk Emad, bad!\nWindows Explorer\u0026rsquo;s FTP client VS FileZilla For a long time I looked down to Windows Explorer\u0026rsquo;s FTP client, especially if compared to products that have been in the market for a long time like FileZilla. To my surprise, for the specific task of deleting files, WE\u0026rsquo;s FTP client out-performed FileZilla; no disconnections at all. If deleting files wasn\u0026rsquo;t so difficult task due to the bad tool, I might have been in a better position.\nDon\u0026rsquo;t put all your eggs in one basket I have one site account with my host in which I put 3 websites; the resources these websites need were really minimal so I just created sub folders and created a web app in each folder: one for my personal blog emadashi.com, one for my DotNetArabi podcast, and a blog for the same podcast. This was made possible by some URL Rewriting tricks.\nThe plague didn\u0026rsquo;t hit all of them, it only hit the blog of the podcast, but when the host decided to take the website down it took them all simply because to my host it\u0026rsquo;s a single website.\nRegardless of my host\u0026rsquo;s decision to take the website down, there are so many things that can go wrong to a website which might affect all the subsites. Separation is good in this case.\nManage your backups Like I said, I had 3 websites with 3 folders, and so I didn\u0026rsquo;t manage the backup by the entirety of the website, instead I managed the backups separately. Makes sense? Well, I also had a web.config in the root in which I laid the URL rewriting rules, without which the internal links to my blog posts will be broken (shout out to Maher for his help and notifications). And you guessed right my dear reader, I didn\u0026rsquo;t backup this one up, in fact I did back it up, but by mere coincidence! *slaps self\u0026rsquo;s hand*. So make sure you backup your website entirely.\nAlso, I thought I knew where my backups were, I was wrong! I was disappointed that I had to look for my backups! Are they in the external drive? Are they on my personal computer? Are they in my personal VM on my work computer?\nYour host\u0026rsquo;s influence This is very important; let\u0026rsquo;s see:\nCommunication: It was good of my host to notify my of the hack, but also they didn\u0026rsquo;t give me a clear message on what I should specifically do, and the potential outcomes if I didn\u0026rsquo;t. Instead of sending me sample files of those malicious files, they could have sent me a list of all the malicious files, saving me (and them) the time and effort to look these up. I can hear you say that this is not their problem, but considering the wasted effort and time they had to give away by the back and forth communication, and spam inflicting their servers …due to all that I reckon it was better if they had just sent me the list of all files.\nAlso, they didn\u0026rsquo;t make it clear that they will shut me down if I don\u0026rsquo;t delete these files on timely manner, if they did I would have been more active and keen to delete them. My impression was that the effect of these files was minimal. Response Time: my host does not provide chat support, only email; this meant long latency before we could cooperate and solve the problem. Especially the notification of putting my website down after 3 days. To their credit, in their last email after the problem was solved, they suggested couple of points on how to secure a WordPress blog; nothing fancy or detailed, but it was good of them, I guess. Use scan service? I deliberately put a question mark at the end of this title; I am not sure how good such services are, my host advised me to use sitelock, but don\u0026rsquo;t consider this as an advice as I haven\u0026rsquo;t tried it yet; I just think it\u0026rsquo;s worth mentioning here.\nSecuring WordPress There are numerous content on the web talking about securing WordPress blog, here is one. But without being too sophisticated, this most important things to do:\nMake sure that the engine is up to date Make sure the plugins are up to date Make sure you use a strong password FTP access: to be able to upload media content to your blog you might need to provide an FTP access (if the installation didn\u0026rsquo;t do that). If you are hosting your WordPress on Linux, DO NOT GIVE 777 permission! Conclusion It was all about me belittling the possibility of being hacked! So let me ask this again: do you have a website? You are already a target, don\u0026rsquo;t be lazy and go secure it NOW!\n","permalink":"https://emadashi.com/2015/12/i-have-been-hacked/","summary":"\u003cp\u003eYes, I\u0026rsquo;ve been hacked, and it wasn\u0026rsquo;t fun! In this post I will go through some of the lessons learned. But before that, let\u0026rsquo;s shed some light on what happened.\u003c/p\u003e\n\u003cp\u003eIt began when a \u003ca href=\"https://twitter.com/omarqdev\"\u003efriend of mine\u003c/a\u003e notified me that my DotNetArabi blog, which is WordPress blog, has new suspicious and unrelated posts. I rushed to my admin page, deleted these posts, and then changed my password to a stronger one.\u003c/p\u003e","title":"I Have Been Hacked!"},{"content":"It was a wonderful week last week spent in the beautiful Gold Coast after a very interesting Microsoft Ignite conference. I got the opportunity to present on how ASP.NET 5 is designed to be suitable for being hosted on the cloud, the following is the recording of my session:\nIf you missed the event you can catch up with recordings of the sessions on channel 9, videos are still being uploaded.\n","permalink":"https://emadashi.com/2015/11/cloud-ready-web-applications-with-asp-net-5-talk-at-microsoft-ignite-australia/","summary":"\u003cp\u003eIt was a wonderful week last week spent in the beautiful Gold Coast after a very interesting \u003ca href=\"https://msftignite.com.au/\"\u003eMicrosoft Ignite conference\u003c/a\u003e. I got the opportunity to present on how ASP.NET 5 is designed to be suitable for being hosted on the cloud, the following is the recording of my session:\u003c/p\u003e\n\u003cp\u003eIf you missed the event you can catch up with recordings of the sessions on \u003ca href=\"https://channel9.msdn.com/Events/Ignite/Australia-2015\"\u003echannel 9\u003c/a\u003e, videos are still being uploaded.\u003c/p\u003e","title":"“Cloud-Ready Web Apps With ASP.NET 5” – Ignite Australia"},{"content":"Dependency Injection has always been an integral part of all the web frameworks under the umbrella of the ASP.NET: Web API, SignalR, and MVC. But historically, these frameworks evolved separately from each other, hence each of these frameworks had its own way of supporting Dependency Injection, even with Katana‘s trial to bring these frameworks together through OWIN, you still needed to do some hackery to have a unified container that supports them all at once. Well, things have changed!\nIn this post I will dive a little bit deeper than this MSDN post; here we will examine the main interfaces involved, have a small peek inside on how things are running, and explain what it means really to switch to your IoC container of choice.\nAbstractions The decision the ASP.NET team made was to provide the dependency injection functionality through abstracting the most common features of the most popular IoC containers out there, and then allowing the different Middlewares to interact with these interfaces to achieve dependency injection.\nASPNET5 supplies a basic IoC container that implements these interfaces, but also allows the developer to swap this default implementation with their own implementation, through which they can use the IoC container of choice. Usually this is something that is not going to be implemented by the application developer himself rather than something to be implemented by the IoC container maintainers; people behind Autofac, or Ninject…etc.\nHaving said that, the ASPNET team has provided a basic implementations for the most common IoC containers, but these implementations are most likely to be revised by the IoC maintainers themselves.\nLet\u0026rsquo;s examine the interfaces, shall we?\nIServiceProvider This is the main interface, through which the developer will be able to retrieve the implementation of a service he/she previously registered with the container (we will come to registration later). This interface has one method only: GetService(Type), think of container.Resolve() in Autofac, or kernel.Get() in Ninject.\nAll Middlewares will have access to two IServiceProvider instances:\nApplication-level: made available to the Middleware through HttpContext.ApplicationServices property Request-level: made available to the Middleware through the HttpContext.RequestServices property. This scoped ServiceProvider is created for each request at the very beginning of the request pipeline by an implicit Middleware, and of course this request-level Service Provider will be disposed by the same Middleware at the end of the request just before sending the response back. Note: I agree, the naming of the ApplicationServices and RequestServices properties might be little bit confusing, but just take it as is for now; these are IServiceProvider.\nAll the Middlewares will use these properties (hopefully the RequestServices only!) to resolve their services, e.g. the ASP.NET MVC Middleware will create the controllers and their dependencies through the RequestServices (if you don\u0026rsquo;t believe me check the code, it\u0026rsquo;s open source ;)), the same goes for creating controllers in Web API …etc.\nIServiceScope Alright, so we said that the RequestServices Service Provider is a scoped container that will be disposed by the end of the request, but how is this managed? You guessed right, by an IServiceScope.\nThis interface should be a wrapper around a scoped container, whose role is to dispose the container at the end of the request. So naturally it has:\nIServiceProvider property: the scoped container Dispose() method: by inheriting the IDisposable interface The question is, who creates the IServiceScope? This brings us to the 3rd interface.\nIServiceScopeFactory Very simple interface as well, it has one method CreateServiceScope() which of course returns a IServiceScope.\nSo if you maintain an IoC container and you want to use it in place of the default one served by default, you have to implement the above mentioned interfaces.\n“But Emad, you didn\u0026rsquo;t talk about registration of services with the container! And how does it fit all together?!”. Patience my friend, let me just finish this section with the last two classes and then we will jump to the registration.\nServiceLifetime Enum with 3 keys to define the lifetime of services (objects really):\nSingleton: single instance throughout the whole application Scoped: single instance within the scoped container Transient: a new instance every time the service is requested ServiceDescriptor Finally, the last class! This class is the construct that will hold all the information the container will use in order to register a service correctly; imagine it saying: “hey you, whichever container you are, when you want to register this service make sure it\u0026rsquo;s a singleton, and take the implementation from this type”. Fancy? Let\u0026rsquo;s check the members of interest:\nServiceType: a property of type Type, this will be the interface for which you will want to substitute with a concrete implementation, e.g. ISchoolTeacher ImplementationType: a property of type Type, this will be the implementation type of the ServiceType above, e.g. SchoolTeacher Lifetime: The lifetime desired for this service: Singleton, Scoped, or Transient. ImplementationFactory: a Func\u0026lt;IServiceProvider, Object\u0026gt;. In some scenarios, the app developer wishes to provide a factory method to instantiate the concrete implementation of the service; maybe there are factors that are outside of the service\u0026rsquo;s control that mandates how the service should be created, this property will hold this factory method. And yes, it\u0026rsquo;s mutually exclusive; if you provide an ImplementationType you don\u0026rsquo;t provide an ImplementationFactory, and vice versa. ImplementationInstance: so you can provide a type as an implementation, and you can provide a factory method to create the object. You also can provide a specific instance, this property of type Object is to hold this instance. Also should be mutually exclusive with the ImplementationType and ImplementationFactory. Great, now for your application to run as expected, you will have a list of these ServiceDescriptors that you will hand to your container, and tell it to register these services according to how they are described. So let\u0026rsquo;s look at how this runs together including the registration part.\nRegistering Services Now to register your services, ASPNET5 expects that your Startup class has a method called ConfigureServices, it takes a list of ServiceDescriptors, wrapped in IServiceCollection, and returns nothing (there is another form of this method that we will discuss shortly). All what you have to do is to create ServiceDescriptors for the services you want to register and add them to the list. The web app will be pick this list later and then register it with the container.\npublic void ConfigureServices(IServiceCollection services) { var serviceDescriptor = new ServiceDescriptor(typeof(IBankManager), typeof(BankManager), ServiceLifetime.Transient); services.Add(serviceDescriptor); // Add MVC services to the services container. services.AddMvc(); } Note: Create ServiceDescriptors can be little bit verbose, this is why you see Middleware using Extension methods to create these ServiceDescriptors, like “service.AddMvc()”\nSo how will this be orchestrated with the application start?\nThe following pseudo statements explain the server startup and how the Service Provider is created, the corresponding code can be found in the HostingEngine.Start method:\nNote: that this post is based on the beta4 version, things have changed since then but the main behavior is the same. So adding the code here won\u0026rsquo;t add much value; pseudo code should be good enough\nHosting engine will create an IServiceCollection, which is a collection of ServiceDescriptors Hosting engine will add all the services it needs to the list Hosting engine will ensure that there is a Startup class in your assembly and that it has a method called ConfigureServices Hosting engine will load this method and call it passing the IServiceCollection ConfigureServices in the Startup class will add the apps services to the list Hosting engine will create a DefaultServiceProvider (the container) and use the information in IServiceCollection to register the services to the DefaultServiceProvider Hosting engine will create the Application Builder (IApplicationBuilder) and assign the new Service Provider to the property IApplicationBuilder.ApplicationServices so it can use it further down Hosting engine will add a Middleware before giving the chance for the Startup.Configure to run, placing it to be the first Middleware in the pipeline. The Middleware is RequestServicesContainerMiddleware, which will be discussed shortly. Hosting engine will call Configure method in Startup class passing the Application Builder to build the Middleware pipeline where the Service Provider can be used through the ApplicationServices property to build the Middleware if needed Great, the server is configured, started, and ready to receive requests. What happens now in a request? how is the dependency injection is run?\nRunning a Request When the request first comes, an HttpContext will be created to be handed to the Invoke method of the first Middleware, and subsequently to all the Middlewares. But just before it\u0026rsquo;s handed to the first Middleware, the Application Builder\u0026rsquo;s Service Provider is assigned to the property HttpContext.ApplicationServices, making the application-level Service Provider available through the HttpContext for all the Middleware to use it up to their needs. Though, it should be kept in mind that this is the application-level Service Provider, and depending on the IoC container of choice, your objects might stay alive through the whole lifetime of the application if you use it.\nNote: in theory, as an application developer, you should not use the Service Provider directly; if you do then you are doing a Service Locator pattern, which is advised against.\nOk then, that was an application-level Service Provider, isn\u0026rsquo;t there a Service Provider that is scoped for the lifetime of the request? Yes, there is.\nIn step 8 in the list above, we mentioned that the hosting engine adds the RequestServicesContaienrMiddleware Middleware at the beginning of the pipeline, giving it the chance to run first.\nThe code hasn\u0026rsquo;t change much for this Middleware for a long time, so I think it\u0026rsquo;s safe to put the code here 🙂\npublic async Task Invoke(HttpContext httpContext) { using (var container = RequestServicesContainer.EnsureRequestServices(httpContext, _services)) { await _next.Invoke(httpContext); } } Going back to the request execution, the server creates the HttpContext, assigns the application-level Service Provider to the HttpConext.ApplicationServices, and then invokes the first Middleware, which is the RequestServicesContainerMiddleware. Can you see that using statement in the Invoke method? There where the magic lies; all what it does is that it creates a Scoped Service Provider that will be disposed at the end of the request. The pseudo will be:\nRequest is handed by RequestServicesContainerMiddleware Invoke will retrieve an IServiceScopeFactory from the application-level Service Provider via HttpContext.ApplicationServices. IServiceScopeFactory will create a scoped container (think of ILifetimeScope in Autofac) The scoped container will be assigned to the property HttpContext.RequestServices The Invoke method calls the subsequent Middlwares allowing the request to go through When all the Middlewares are invoked and the call return is back to the RequestServicesContainerMiddleware, the scoped Service Provider will be disposed by the “using” statement. Note: RequestServicesContainerMiddleware uses a wrapper/helper class RequestServicesContainer to manage the creation and disposition of the scoped Service Provider, which is the object used in the “using” statement really\nThe HttpContext.RequestServices is the scoped container for the request lifetime, all the subsequent Middleware will have access to it. For example, If you check the MvcRouteHandler.InvokeActionAsync you will see that it\u0026rsquo;s using it to create the controllers:\nprivate async Task InvokeActionAsync(RouteContext context, ActionDescriptor actionDescriptor) { var services = context.HttpContext.RequestServices; Debug.Assert(services != null); var actionContext = new ActionContext(context.HttpContext, context.RouteData, actionDescriptor); var optionsAccessor = services.GetRequiredService\u0026lt;IOptions\u0026lt;MvcOptions\u0026gt;\u0026gt;(); actionContext.ModelState.MaxAllowedErrors = optionsAccessor.Options.MaxModelValidationErrors; var contextAccessor = services.GetRequiredService\u0026lt;IScopedInstance\u0026lt;ActionContext\u0026gt;\u0026gt;(); contextAccessor.Value = actionContext; var invokerFactory = services.GetRequiredService\u0026lt;IActionInvokerFactory\u0026gt;(); var invoker = invokerFactory.CreateInvoker(actionContext); if (invoker == null) { LogActionSelection(actionSelected: true, actionInvoked: false, handled: context.IsHandled); throw new InvalidOperationException( Resources.FormatActionInvokerFactory_CouldNotCreateInvoker( actionDescriptor.DisplayName)); } await invoker.InvokeAsync(); } Note: a reminder, again, you shouldn\u0026rsquo;t need to use the Service Provider directly; try to manifest your dependencies through constructors, avoid the Service Locator pattern.\nAwesome, now what if you want to substitute the default container with something like Autofac? Glad you asked, let\u0026rsquo;s see how.\nBring Your Own IoC Container Before we start, this is a reminder that this is something to be implemented by the IoC container maintainers, not by the application developer.\nTo use your own container you have to implement the interfaces: IServiceProvider, IServiceScope, and IServiceScopeFactory. Implementing the interfaces should be straight forward because the interface itself is mandating what you need to do, the Autofac implementation can be used as an example.\nBut the subtle thing that needs to be explained that the ConfigureServices method in the Startup class has another form that the hosting engine expects, this form is expected in case the developer wants to use his own IoC container. In this form the method should return an IServiceProvider; once all the desired ServiceDescriptors are added to the IServiceCollection, the developer should create his container, register the services the way the container expects it, and then returns the container\u0026rsquo;s implementation of the IServiceProvider. The following is the code to use Autofac:\npublic IServiceProvider ConfigureServices(IServiceCollection services) { // Add MVC services to the services container. services.AddMvc(); var builder = new ContainerBuilder(); // Create the container and use the default application services as a fallback AutofacRegistration.Populate( builder, services); var container = builder.Build(); return container.Resolve\u0026lt;IServiceProvider\u0026gt;(); } The AutofacRegistration.Populate registers the services the way Autofac likes, and registers the IServiceScope and IServiceScopeFactory implementations (this is only a part, check the complete code on the link):\nprivate static void Register( ContainerBuilder builder, IEnumerable descriptors) { foreach (var descriptor in descriptors) { if (descriptor.ImplementationType != null) { // Test if the an open generic type is being registered var serviceTypeInfo = descriptor.ServiceType.GetTypeInfo(); if (serviceTypeInfo.IsGenericTypeDefinition) { builder .RegisterGeneric(descriptor.ImplementationType) .As(descriptor.ServiceType) .ConfigureLifecycle(descriptor.Lifetime); } else { builder .RegisterType(descriptor.ImplementationType) .As(descriptor.ServiceType) .ConfigureLifecycle(descriptor.Lifetime); } } else if (descriptor.ImplementationFactory != null) { var registration = RegistrationBuilder.ForDelegate(descriptor.ServiceType, (context, parameters) =\u0026gt; { var serviceProvider = context.Resolve(); return descriptor.ImplementationFactory(serviceProvider); }) .ConfigureLifecycle(descriptor.Lifetime) .CreateRegistration(); builder.RegisterComponent(registration); } else { builder .RegisterInstance(descriptor.ImplementationInstance) .As(descriptor.ServiceType) .ConfigureLifecycle(descriptor.Lifetime); } } } But then how will this fit with the 9 steps above in Registering Services? Well, it changes a little bit to become like this (red and strike-through\u0026rsquo;s are the changes):\nHosting engine will create an IServiceCollection, which is a collection of ServiceDescriptors Hosting engine will add all the services it needs to the list Hosting engine will ensure that there is a Startup class in your assembly and that it has a method called ConfigureServices. First it will look for the form that returns an IServiceProvider, if not found then it uses the one that returns nothing Hosting engine will load this method and call it passing the IServiceCollection ConfigureServices in the Startup class will add the apps services to the list ConfigureServices will create the IoC container of choice ConfigureServices will register all the services in the IServiceCollection to the new container ConfigureService will make sure to register the IServiceScope and IServiceScopeFactory with the services (remember step 2 in Running a Request above?) ConfigureServices will create an instance of the container\u0026rsquo;s implementation of the IServiceProvider and return it Hosting engine will create a DefaultServiceProvider and use the information in IServiceCollection to register the services to the DefaultServiceProvider The Hosting engine will retrieve the IServiceProvider supplied\nHosting engine will create the Application Builder (IApplicationBuilder) and assign the new ServiceProvider to the property IApplicationBuilder.ApplicationServices so it can use it further down Hosting engine will add a Middleware before giving the chance for the Startup.Configure to run, placing it to be the first Middleware in the pipeline. The Middleware is called RequestServicesContainerMiddleware, which will be discussed shortly. Hosting engine will call Configure method in Startup class passing the Application Builder to build the Middleware pipeline where the Service Provider can be used through the ApplicationServices property to build the Middleware if needed Voila! all is ready\nConclusion I hope by now there is no magic in how dependency injection really works in ASP.NET 5, if you have questions or comments feel free leave it in the comments section.\nTips\u0026rsquo;n Tricks In order for you debug this whole process and step in the code you need to do two things: Get the code by checking out the repositories from GitHub and make sure you are on one release tag (like beta4) Create a web app in Visual Studio Alter the “global.json” file so you add the paths to the repositories source to the “projects” key like this * Now you have the code in your hands and can step through it Code of interest: HostingEngine.Start (Microsoft.AspNet.Hosting) MvcRouteHandler.InvokeActionAsync (Microsoft.AspNet.Mvc) RequestServicesContainerMiddleware (Microsoft.AspNet.Hosting.Internal) RequestServicesContainer.EnsureRequestServices (Microsoft.AspNet.Hosting.Internal) StartupMethods (Microsoft.AspNet.Hosting.Startup) ApplicationStartup.LoadStartupMethods StartupLoader (Microsoft.AspNet.Hosting) ","permalink":"https://emadashi.com/2015/06/dependency-injection-in-asp-net-5-one-step-deeper/","summary":"\u003cp\u003eDependency Injection has always been an integral part of all the web frameworks under the umbrella of the ASP.NET: Web API, SignalR, and MVC. But historically, these frameworks evolved separately from each other, hence each of these frameworks had its own way of supporting Dependency Injection, even with \u003ca href=\"https://katanaproject.codeplex.com/\" title=\"Katana\"\u003eKatana\u003c/a\u003e‘s trial to bring these frameworks together through \u003ca href=\"http://owin.org/\" title=\"OWIN\"\u003eOWIN\u003c/a\u003e, you still needed to do some hackery to have a unified container that supports them all at once. Well, things have changed!\u003c/p\u003e","title":"Dependency Injection In ASP.NET 5 – One Step Deeper"},{"content":"Over the last week, the first ANZCoders virtual conference was taking place, the conference that you can attend in your pyjamas! Fifteen sessions over five days by twelve speakers, all voted upon by the audience themselves.\nThe conference was live, but it was recorded also on Youtube; every session has its own Youtube video available for watching any time. So I hear you say “Why attend live if the video is going to be available later?!”…here is why:\nThe live Q \u0026amp; A: after the session the audience was given the chance to ask the speaker questions, just like any real conference; which is something that is not available for people watching the video later. The live discussion: As the speaker was running through the session, the chat channel was humming with all sorts of different opinions, supporting stories, links to resources, and there lots of laughs that made the conference even more fun! although this might sound distracting a little bit for both the audience and the speaker, but IMHO the benefits overcame the drawbacks. The people: connecting with such intelligent and passionate people was invaluable! Enough said. The only drawback I guess was the reliability of the speaker\u0026rsquo;s internet connection; I for example lost at least 6 valuable minutes of my “IoC in ASPNET5” talk, even with my best arrangements to have proper connectivity! (Yes, you need to skip past the minutes from 2:30 to 8:30). But hey, a speaker can have a flu in face-to-face conferences as well ;).\nWill I participate in a live virtual conference again? Absolutely!\nSo big thanks to Richard Banks for organizing the conference, and big thanks to the sponsors, the speakers, and the lovely audience who made this event a success!\n","permalink":"https://emadashi.com/2015/06/anzcoders-wrapup/","summary":"\u003cp\u003eOver the last week, the first \u003ca href=\"http://www.anzcoders.com/\"\u003eANZCoders\u003c/a\u003e virtual conference was taking place, the conference that you can attend in your pyjamas! Fifteen sessions over five days by twelve speakers, all voted upon by the audience themselves.\u003c/p\u003e\n\u003cp\u003eThe conference was live, but it was recorded also on \u003ca href=\"https://www.youtube.com/channel/UCIVu42Uk-a6oFAflal8O-ag\"\u003eYoutube\u003c/a\u003e; every session has its own Youtube video available for watching any time. So I hear you say “Why attend live if the video is going to be available later?!”…here is why:\u003c/p\u003e","title":"ANZCoders Wrapup"},{"content":" I have blogged before about some of the skills that a consultant should be acquainted with like Story Telling, Knowledge Depth \u0026amp; Breadth, and Having an Opinion, all of which I see very important. But in this post I would not hesitate to say that self-confidence is the single most important amongst them all!\nBefore we continue, what does “self-confidence” mean? my words of choice would be: “it is the belief someone has about his/her capability of accomplishing something that he/she hasn\u0026rsquo;t tried before“. Notice here that it\u0026rsquo;s a “belief”\nLacking Self-Confidence Is Bad “How come you think it is the most important?” I hear you ask. Well, if you have been following my posts you will clearly see that I love bullet points, so let me list how lack of self-confidence is bad:\nLack of self-confidence is the chuckles and chains that the individual would willingly put around his neck, preventing himself from achieving even the simplest of goals, even if he has the potentials and capabilities; he might be smart, thoughtful, knowledgeable, and resourceful, but he will not utilize any of these treats because he thinks he doesn\u0026rsquo;t have them, nill, zero! The main job of a consultant is to solve the problems of his clients; the client is clueless, confused, lost, in doubts, and he needs help, he needs someone to rescue him from the trouble he is in. Imagine yourself to be such a client, would you accept a consultant\u0026rsquo;s help if he wasn\u0026rsquo;t in a better state than you are? if the consultant himself is not sure of his capabilities, he doubts his skills, will you still hand your problem to him to solve? For employees it might be different; the employee might be considered as an investment the company or management might invest in, so he receives the encouragement and support to get him going, increase self-confidence if he lacks it, consultants on the other hand don\u0026rsquo;t have this luxury. Even if you are not taking clients, your image seen by people and peers will be affected. People will see you as you see yourself; if you see yourself as someone who can provide solutions and solve problems, you will be looked at as such person, if you see yourself as weak, stupid, or failure then, no surprise, you will be looked at as such person. Self-doubt brings depression, with various of levels, if not controlled. If you find these points aren\u0026rsquo;t bad enough, then re-read the first point above OK it\u0026rsquo;s obvious how tremendously dangerous this is, but how to solve this?\nHow to Increase Self-Confidence Shall we list:\nAcknowledge the problem; this is going to be the driver force of change; realization. You have to realise how big of a problem this is, and realise the grave effect it has on you. This is a state that we should have absolutely zero tolerance with. Remember the “belief” part of the definition? you have to find a proof that supports your belief, why do you think you can\u0026rsquo;t do it? can you prove that you can\u0026rsquo;t? I would say help yourself out and whenever you are in doubt try to remember all the success stories and accomplishments you have achieved in your life that can be compared to the situation you are in, and use it as a proof that you can.\nWhat if you can\u0026rsquo;t find a proof of success? well, at least you don\u0026rsquo;t have a proof of failure! so you can\u0026rsquo;t be doubting yourself!\nWhat if you DO have a proof of failure? then you should ask yourself: “was it the same circumstances? have I changed since then? is this situation exactly like the one I failed in?” if your answer was no, and most likely it is, then this can\u0026rsquo;t be used as a proof, and we are back to the fact that you don\u0026rsquo;t really know if you can\u0026rsquo;t accomplish! if your answer was yes though, then let\u0026rsquo;s examine the next point. Ask yourself “what can I do to do things differently this time? How can I change the reason that caused my previous failure, so it is not any more?” and this is a competitive advantage over confident people, you are URGED to think more, try harder, prepare better, and find a better way of doing things. Remember the turtle and rabbit race story? Self-doubt and the fear of failure goes hand in hand; we think we can\u0026rsquo;t accomplish, consequently we think that if we try we will fail, and failing is a big problem, right? well, no! whenever I am anxious about something, my wise wife asks me “what is the worst thing that can happen?”; we tend to build feelings of fear, based on our implicit imagination, that are much greater than what they would really be if the failure really happens. So thinking about the worst case scenario would invalidate these fears and give them their proper size. In most of the cases, the opportunity cost is much greater than the failure cost. If self-doubt prevented you from trying to take a leading position, then your loss of losing that position is greater than the loss you would have trying and failing (in that attempt); at least you will learn how to do it better next attempt. It might a simple sentence, but think about it for a minute, absorb it…what do you think? Finally, know that this is a continuous struggle with yourself, this will never end! if you grow you will be exposed to new things, if you are exposed to new things you will doubt yourself, period! hopefully, though, with these tips and tricks you will be in control, you will use your self-doubt to your advantage and move forward successfully.\nNow go and nail it!\n[Image Credit: Kevin Cawley]\n","permalink":"https://emadashi.com/2015/01/consultant-skills-self-confidence/","summary":"\u003cimg loading=\"lazy\" decoding=\"async\" class=\"alignright wp-image-507 size-medium\" src=\"/wp-content/uploads/2015/01/SelfImage-300x158.jpg\" alt=\"Look into the mirror, Increase self-confidence\" width=\"300\" height=\"158\" srcset=\"/wp-content/uploads/2015/01/SelfImage-300x158.jpg 300w, /wp-content/uploads/2015/01/SelfImage.jpg 420w\" sizes=\"(max-width: 300px) 100vw, 300px\" /\u003e\n\u003cp\u003eI have blogged before about some of the skills that a consultant should be acquainted with like \u003ca href=\"http://www.emadashi.com/2013/06/consultants-skills-story-telling/\"\u003eStory Telling\u003c/a\u003e, \u003ca href=\"http://www.emadashi.com/2014/04/consultant-skills/\"\u003eKnowledge Depth \u0026amp; Breadth\u003c/a\u003e, and \u003ca href=\"http://www.emadashi.com/2014/11/consultant-skills-having-an-opinion/\"\u003eHaving an Opinion\u003c/a\u003e, all of which I see very important. But in this post I would not hesitate to say that self-confidence is the single most important amongst them all!\u003c/p\u003e\n\u003cp\u003eBefore we continue, what does “self-confidence” mean? my words of choice would be: “\u003cstrong\u003eit is the belief someone has about his/her capability of accomplishing something that he/she hasn\u0026rsquo;t tried before\u003c/strong\u003e“. Notice here that it\u0026rsquo;s a “belief”\u003c/p\u003e","title":"Consultant Skills: Self-Confidence"},{"content":"This is the third of three posts I\u0026rsquo;ve written about consultant\u0026rsquo;s skills, check the previous posts if you like:\nConsultant Skills: Story Telling Consultant Skills: Knowledge Depth \u0026amp; Breadth ————-\nWe work in an industry where one general problem can be solved by too many ways, each emerges from a different mindset and different circumstances. But also, in this industry there is community pressure, there are “cool geeks” and “cool solutions”, there are “best practices”, and there are hypes and fads.\nAnd you guessed right, my dear reader, many of us lease their brains to these influences; if it is individuals, we wait for their blog post or tweets, if it is organizations we wait their radar, or if it is a community we count how many use it, …etc.\nAnd here I would bring up two questions:\nWhy do we do that? And what is the impact of this behavior on us as individual experts, and the industry? Answering these two questions should positively change the way we think of technology, and how to interact with it. So let\u0026rsquo;s attempt answering them:\nWhy do we do that? Because:\nThinking is heavy, and we are lazy! having an opinion about a certain solution, a database engine, an architectural design, or an open source project…having an opinion requires knowledge that needs to be acquired, and requires time to sit and think of all the scenarios in which this solution can be suitable, or not. All of this is heavy and takes a lot of effort, so instead of taking that burden we seek ready answers We are afraid to be judged. I\u0026rsquo;d want to give an opinion about this framework but I am afraid to criticize it, I want to say that I don\u0026rsquo;t like it for that reason, but I am afraid that my opinion would turn out wrong, or “stupid” in the eyes of others. So I\u0026rsquo;d rather keep quiet, right? Lack of self confidence. And this is different from the point (2) above, here I don\u0026rsquo;t care what others think of me, but I am not sure of my brain capabilities; am I really intelligent enough to judge this framework? we put ourselves down to the extent that we don\u0026rsquo;t even ask ourselves if we are smart enough or not! We just believe we aren\u0026rsquo;t, and consequently never think of articulating an opinion at all. What is the impact of not having an opinion? We become mentally disabled! We become too dependent on others to the extent that we can\u0026rsquo;t intellectually live on our own. What if circumstances push us to situations where the capability of getting external help is narrow? Opinions supported by proofs drive solutions. If we don\u0026rsquo;t have opinions we transform from developers to coders, we loose our value as solution providers, which is bad for us economically as the demand on us in the market diminishes, and more importantly bad to our self-respect; what are we other than the value we bring to the world? you must have heard of the “The surprising truth about what motivates us“ Others give us THEIR solutions, that solved THEIR problems, which will not necessarily solve ours. We damage the industry as we shutdown intellectual power that would\u0026rsquo;ve enriched the industry, no matter how small that would be. So, if you agree with me to the points above, then let\u0026rsquo;s check some of the suggestions that would enable me and you to form opinions, and hopefully good ones.\nHow to form an opinion? Don\u0026rsquo;t underestimate your mental capabilities. This is the most important point! At the end of the day it\u0026rsquo;s mere logic, and we all have logic; in general fast is better than slow, simple is better than complex, cheep is better than expensive, …etc. Try answering your own questions. For example, you see more ORMs coming to existence and more people using them, you used it yourself, but you never had an opinion about them. One time you wonder if they really provide a value, or if they are just a waste, so you instantly think of your really smart colleague, he must have an answer. My suggestion to you is just before you ask him, try to answer the question yourself; doing so explicitly will force you to think, you might surprise yourself! Learn from others, observe their opinions. And no, I am not saying to adopt their opinion, what I am saying is that forming an opinion is a skill that can be learned. Check how they approach the product, what they see as weaknesses and why, and what they see as power and why. The better you observe smart people\u0026rsquo;s opinions, the better you can form one Acquire and then utilize knowledge. In order to form an opinion about something you have to know something about it! the more you know, the closer to being correct your opinion is, so you better do your homework and acquire knowledge as much as you can. Of course up to some point you will not have the time, capacity, or resources to know more, in that case you build it according to the knowledge you accumulated, the catch here though is to declare that amount of knowledge when you give your opinion. Caveats We still need to ask experts. In fact, I even encourage you to do so, but the only thing I am asking is not to follow it blindly! The idea here is to be able to judge for ourselves which solution is more solid than another using our own logic, even if it means we have to weigh between experts opinions. You don\u0026rsquo;t have to have an opinion about everything, but at least on things that affect your technical life. Conclusion You want to be more valuable? You want to grow your career? You want to be independent? Then have an opinion.\n","permalink":"https://emadashi.com/2014/11/consultant-skills-having-an-opinion/","summary":"\u003cp\u003e\u003cem\u003eThis is the third of three posts I\u0026rsquo;ve written about consultant\u0026rsquo;s skills, check the previous posts if you like:\u003c/em\u003e\u003c/p\u003e\n\u003cul\u003e\n\u003cli\u003e\u003cem\u003e\u003ca href=\"http://www.emadashi.com/2013/06/consultants-skills-story-telling/\"\u003eConsultant Skills: Story Telling\u003c/a\u003e\u003c/em\u003e\u003c/li\u003e\n\u003cli\u003e\u003cem\u003e\u003ca href=\"http://www.emadashi.com/2014/04/consultant-skills/\"\u003eConsultant Skills: Knowledge Depth \u0026amp; Breadth\u003c/a\u003e\u003c/em\u003e\u003c/li\u003e\n\u003c/ul\u003e\n\u003cp\u003e————-\u003c/p\u003e\n\u003cp\u003eWe work in an industry where one general problem can be solved by too many ways, each emerges from a different mindset and different circumstances. But also, in this industry there is community pressure, there are “cool geeks” and “cool solutions”, there are “best practices”, and there are hypes and fads.\u003c/p\u003e","title":"Consultant Skills: Having an Opinion"},{"content":"I had the opportunity to visit Mount Buller to do skiing for the first time in my life (thanks to Joshua McKinny), and the experience was UNBELIEVABLE! In addition to the loads of fun I had, I learned some life lessons that can be applied in any field, even software! and I’d like to share with you.\nWhen in doubt, get rid of doubt.\nA night before the trip, I was at the shops. I saw this winter warm hat that I thought I should buy, then I remembered I had one at home but I wasn\u0026rsquo;t sure if I still had it; I remembered one time when I needed it and I couldn\u0026rsquo;t find it, so I had doubts!\nI had to take a decision, something like the following diagram:\nApparently possibility D has a much higher cost compared to any A, B, and C. And the only way to avoid it is to take decision X rather than Y… I chose Y, and ended up with D!\nAt the end I managed, but let\u0026rsquo;s just say I was left in an embarrassing situation. Everything has pros and cons\nBetween choosing Skiing and Snowboarding, I chose Skiing; the majority of opinions was that Skiing is easier and you have more control, which is better for beginners. But this came with a cost; the boots were horrific to walk with, and I had to carry two sliders and two poles all around! I don\u0026rsquo;t regret my choice, but let\u0026rsquo;s say I am a lot more aware that there are cons with every choice we make, the question is are we willing to make the most of it or not. Listen to the experts\nJosh gave us of a long list of advice beforehand; what stuff to bring along, where to get the gears from, what we should expect…, all of which made a huge difference. And whenever you fail to listen you are beaten, I will never forget a scarf when I am at the top of the mountain! It\u0026rsquo;s more difficult than I thought\nI judged Skiing too early, from the videos and photos I have seen in my life, it seemed too easy! just go in angles and change the direction once you reach the edge of the slope, and repeat until you reach the end. Guess what? Easier said than done!\nSkiing literally is sliding on a slippery surface, while you try your best to control sliding; the sliders are long, heavy, and go in all directions, the amount of effort you have to give to control the sliders to go in a certain direction is big, and they don\u0026rsquo;t just listen! the angles in which you have to position them to accomplish that control is tricky, the pressure on your knees is enormous, your body\u0026rsquo;s position makes a big difference, and the slightest loss of control of the sliders your body will start wobbling, and you don\u0026rsquo;t just cross your legs to fix that! Oh and did I mention that there are types of snow, some of which makes things even harder?…ENHALES!\nThe idea of this lesson, don\u0026rsquo;t just underestimate and judge too quickly, anything, unless you try it out first. **You don\u0026rsquo;t know what you are missing, until you try it. It\u0026rsquo;s loads of fun!\n** Sometimes we are just too lazy, and due to our laziness (or let\u0026rsquo;s say “comfort zone”) we miss out on too many opportunities. I knew that it\u0026rsquo;s going to take me a day, and it\u0026rsquo;s going to be cold, and I have to learn skiing, and was afraid that I wouldn\u0026rsquo;t enjoy it…but…I pushed myself; I also knew that this is not going to happen again anytime soon and should tick it off my bucket list, let me tell you this: IT WAS AWESOME! Doing it myself revealed many aspect I\u0026rsquo;d never get from watching a video, the mere speed a human can reach on these sliders is of utmost thrill, let alone the joy when you really start controlling it.\nIt really made me think of all the things I might be missing due to the same reason, whether it was leisure or career opportunities You are going to fall, and it\u0026rsquo;s going to hurt\nThere is absolutely no escape from falling, unless you are an expert, than you already have fallen plenty of times, and to the surprise, it hurts! I fell so many times: one time on my arm which ended up swollen, one time twisted my leg, and another time was displaced couple of meters away from my slider after it flew off.\nThese falls were necessary; I knew exactly what to do, and what NOT to do, because I didn\u0026rsquo;t only “hear” about the consequences, I lived them, and they hurt! So because of these falls I had to learn, because of these falls I became a better skier In fact pain is part of the fun\nThe falls mentioned in point 5 were painful indeed, but they also were fun; it breaks the routine of the body, the monotonous experience we go through in our lives, being thrown and twisted in the air, and feeling your body going through a different experience, all of this had its flavor, it might be funny, but it really did (don\u0026rsquo;t break something while you do that).\nBut more important than that, these falls also gave a better meaning for success; when I slide for longer periods without falling, the feeling of success I have is deep, and meaningful. If it was too easy that success would taste like…meh. Following instructions is important, but so is following instinct\nI had a lesson by an instructor for I am an absolute newbie, the instructor gave us the instructions on how to stop and manuever, along with some other instructions, and then released us to the wild. I tried to follow all his instructions perfectly, usually I am a good student, but I still kept falling!\nThen at one of the slopes I felt like I should be leaning my body in a certain angle, and press with my toes down, it was an absolutely instinctive feeling, not a trial and error thing, and guess what…it worked! the instructor didn\u0026rsquo;t mention this; maybe because he never really gave it a deep thought, maybe he has been skiing all his life, regardless of the reason, he gave me instructions that weren\u0026rsquo;t enough, I had to use my instinct that proved highly valuable in addition to the external knowledge. Most importantly, company is everything\nThis, my dear reader, was of the utmost importance; Josh and Neil were extremely good company, very understanding, patient with my primitive skiing skills, easy going with suggestions, generous, and full of knowledge that filled the trip with beneficial discussions. All of which allowed me to enjoy things enough to come up with the previous 8 lessons! Did I learn more lessons? indeed, but 9 is a nice number 😉\n","permalink":"https://emadashi.com/2014/08/9-things-i-learned-from-skiing/","summary":"\u003cp\u003eI had the opportunity to visit Mount Buller to do skiing for the first time in my life (thanks to \u003ca href=\"https://twitter.com/joshuamck\"\u003eJoshua McKinny\u003c/a\u003e), and the experience was UNBELIEVABLE! In addition to the loads of fun I had, I learned some life lessons that can be applied in any field, even software! and I’d like to share with you.\u003c/p\u003e\n\u003cp\u003e\u003ca href=\"http://www.emadashi.com/wp-content/uploads/2014/08/buller.jpg\"\u003e\u003cimg loading=\"lazy\" decoding=\"async\" class=\"alignnone  wp-image-487\" src=\"/wp-content/uploads/2014/08/buller.jpg\" alt=\"buller\" width=\"480\" height=\"360\" srcset=\"/wp-content/uploads/2014/08/buller.jpg 960w, /wp-content/uploads/2014/08/buller-300x225.jpg 300w, /wp-content/uploads/2014/08/buller-660x495.jpg 660w\" sizes=\"(max-width: 480px) 100vw, 480px\" /\u003e\u003c/a\u003e\u003c/p\u003e\n\u003col\u003e\n\u003cli\u003e\u003cstrong\u003eWhen in doubt, get rid of doubt\u003c/strong\u003e.\u003cbr\u003e\nA night before the trip, I was at the shops. I saw this winter warm hat that I thought I should buy, then I remembered I had one at home but I wasn\u0026rsquo;t sure if I still had it; I remembered one time when I needed it and I couldn\u0026rsquo;t find it, \u003cstrong\u003eso I had doubts\u003c/strong\u003e!\u003cbr\u003e\nI had to take a decision, something like the following diagram:\u003cbr\u003e\n\u003ca href=\"http://www.emadashi.com/wp-content/uploads/2014/08/buyhat.png\"\u003e\u003cimg loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-482\" src=\"/wp-content/uploads/2014/08/buyhat.png\" alt=\"\" width=\"554\" height=\"276\" srcset=\"/wp-content/uploads/2014/08/buyhat.png 554w, /wp-content/uploads/2014/08/buyhat-300x149.png 300w\" sizes=\"(max-width: 554px) 100vw, 554px\" /\u003e\u003c/a\u003e\u003cbr\u003e\nApparently possibility D has a much higher cost compared to any A, B, and C. And the only way to avoid it is to take decision X rather than Y… I chose Y, and ended up with D!\u003cbr\u003e\nAt the end I managed, but let\u0026rsquo;s just say I was left in an embarrassing situation.\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eEverything has pros and cons\u003c/strong\u003e\u003cbr\u003e\nBetween choosing Skiing and Snowboarding, I chose Skiing; the majority of opinions was that Skiing is easier and you have more control, which is better for beginners. But this came with a cost; the boots were horrific to walk with, and I had to carry two sliders and two poles all around! I don\u0026rsquo;t regret my choice, but let\u0026rsquo;s say I am a lot more aware that there are cons with every choice we make, the question is are we willing to make the most of it or not.\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eListen to the experts\u003c/strong\u003e\u003cbr\u003e\nJosh gave us of a long list of advice beforehand; what stuff to bring along, where to get the gears from, what we should expect…, all of which made a huge difference. And whenever you fail to listen you are beaten, I will never forget a scarf when I am at the top of the mountain!\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eIt\u0026rsquo;s more difficult than I thought\u003c/strong\u003e\u003cbr\u003e\nI judged Skiing too early, from the videos and photos I have seen in my life, it seemed too easy! just go in angles and change the direction once you reach the edge of the slope, and repeat until you reach the end. Guess what? Easier said than done!\u003cbr\u003e\nSkiing literally is sliding on a slippery surface, while you try your best to control sliding; the sliders are long, heavy, and go in all directions, the amount of effort you have to give to control the sliders to go in a certain direction is big, and they don\u0026rsquo;t just listen! the angles in which you have to position them to accomplish that control is tricky, the pressure on your knees is enormous, your body\u0026rsquo;s position makes a big difference, and the slightest loss of control of the sliders your body will start wobbling, and you don\u0026rsquo;t just cross your legs to fix that! Oh and did I mention that there are types of snow, some of which makes things even harder?…ENHALES!\u003cbr\u003e\nThe idea of this lesson, don\u0026rsquo;t just underestimate and judge too quickly, anything, unless you try it out first.\u003c/li\u003e\n\u003cli\u003e**You don\u0026rsquo;t know what you are missing, until you try it. It\u0026rsquo;s loads of fun!\u003cbr\u003e\n** Sometimes we are just too lazy, and due to our laziness (or let\u0026rsquo;s say “comfort zone”) we miss out on too many opportunities. I knew that it\u0026rsquo;s going to take me a day, and it\u0026rsquo;s going to be cold, and I have to learn skiing, and was afraid that I wouldn\u0026rsquo;t enjoy it…but…I pushed myself; I also knew that this is not going to happen again anytime soon and should tick it off my bucket list, let me tell you this: IT WAS AWESOME! Doing it myself revealed many aspect I\u0026rsquo;d never get from watching a video, the mere speed a human can reach on these sliders is of utmost thrill, let alone the joy when you really start controlling it.\u003cbr\u003e\nIt really made me think of all the things I might be missing due to the same reason, whether it was leisure or career opportunities\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eYou are going to fall, and it\u0026rsquo;s going to hurt\u003c/strong\u003e\u003cbr\u003e\nThere is absolutely no escape from falling, unless you are an expert, than you already have fallen plenty of times, and to the surprise, it hurts! I fell so many times: one time on my arm which ended up swollen, one time twisted my leg, and another time was displaced couple of meters away from my slider after it flew off.\u003cbr\u003e\nThese falls were necessary; I knew exactly what to do, and what NOT to do, because I didn\u0026rsquo;t only “hear” about the consequences, I lived them, and they hurt! So because of these falls I had to learn, because of these falls I became a better skier\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eIn fact pain is part of the fun\u003c/strong\u003e\u003cbr\u003e\nThe falls mentioned in point 5 were painful indeed, but they also were fun; it breaks the routine of the body, the monotonous experience we go through in our lives, being thrown and twisted in the air, and feeling your body going through a different experience, all of this had its flavor, it might be funny, but it really did (don\u0026rsquo;t break something while you do that).\u003cbr\u003e\nBut more important than that, these falls also gave a better meaning for success; when I slide for longer periods without falling, the feeling of success I have is deep, and meaningful. If it was too easy that success would taste like…meh.\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eFollowing instructions is important, but so is following instinct\u003c/strong\u003e\u003cbr\u003e\nI had a lesson by an instructor for I am an absolute newbie, the instructor gave us the instructions on how to stop and manuever, along with some other instructions, and then released us to the wild. I tried to follow all his instructions perfectly, usually I am a good student, but I still kept falling!\u003cbr\u003e\nThen at one of the slopes I felt like I should be leaning my body in a certain angle, and press with my toes down, it was an absolutely instinctive feeling, not a trial and error thing, and guess what…it worked! the instructor didn\u0026rsquo;t mention this; maybe because he never really gave it a deep thought, maybe he has been skiing all his life, regardless of the reason, he gave me instructions that weren\u0026rsquo;t enough, I had to use my instinct that proved highly valuable in addition to the external knowledge.\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eMost importantly, company is everything\u003c/strong\u003e\u003cbr\u003e\nThis, my dear reader, was of the utmost importance; \u003ca href=\"https://twitter.com/joshuamck\"\u003eJosh\u003c/a\u003e and \u003ca href=\"https://twitter.com/campbell_neil\"\u003eNeil\u003c/a\u003e were extremely good company, very understanding, patient with my primitive skiing skills, easy going with suggestions, generous, and full of knowledge that filled the trip with beneficial discussions. All of which allowed me to enjoy things enough to come up with the previous 8 lessons!\u003c/li\u003e\n\u003c/ol\u003e\n\u003cp\u003eDid I learn more lessons? indeed, but 9 is a nice number 😉\u003c/p\u003e","title":"9 Things I Learned From Skiing"},{"content":"Here are the slides of my last talk “OWIN, Katana, Helios…What\u0026rsquo;s Going On?!” I delivered at DDD Melbourne. Sadly there was no recording.\nOwin, Katana, and Helios from Emad Alashi ","permalink":"https://emadashi.com/2014/07/owin-katana-and-helios-at-dddmelbourne-presentation-slides/","summary":"\u003cp\u003eHere are the slides of my last talk “OWIN, Katana, Helios…What\u0026rsquo;s Going On?!” I delivered at \u003ca href=\"http://dddmelbourne.com/\"\u003eDDD Melbourne.\u003c/a\u003e Sadly there was no recording.\u003c/p\u003e\n\u003cp\u003e \u003c/p\u003e\n\u003cdiv style=\"margin-bottom: 5px;\"\u003e\n  \u003cstrong\u003e \u003ca title=\"Owin, Katana, and Helios\" href=\"https://www.slideshare.net/splashup/owin-katanahelios\" target=\"_blank\"\u003eOwin, Katana, and Helios\u003c/a\u003e \u003c/strong\u003e from \u003cstrong\u003e\u003ca href=\"http://www.slideshare.net/splashup\" target=\"_blank\"\u003eEmad Alashi\u003c/a\u003e\u003c/strong\u003e\n\u003c/div\u003e","title":"OWIN, Katana, and Helios At DDDMelbourne – Presentation Slides"},{"content":"I was involved in a project that was given 10 days to finish, the tight schedule was due to budget reasons.\nThe client explained to me his requirements and then asked for an estimate for details. We stood in front of the whiteboard, broke down the features and then started estimating the time for these features, until we reached feature x.\nIn my technical life I\u0026rsquo;ve been beaten by over-simplified requirements far too many times, so as simple as feature x sounded I strongly felt that it might stretch. Subsequently, this influenced my opinion of giving feature x three days, against which the client of course argued back.\nReasonably enough, I listened, and then naturally gave counter arguments, but still the client insisted “this feature will NOT take three days!”. Going back and forth I realized that the gap of understanding the feature between us was too great.\nOne way this could\u0026rsquo;ve continued is that I would have sat with him, tried to come up with all the possible scenarios and all the details involved in building feature x… until I convinced him, or of course until he convinced me. Weighing the costs and the benefits of this approach, it was not worth it! we would have wasted probably couple of hours just arguing if the feature is going to take 1 or 3 days; this means that we would have wasted between 17-50% of the feature time arguing how much it\u0026rsquo;s going to take!\nSo I chose not to go that direction, instead I questioned the value of estimating in this scenario, do we really need to estimate the details of this feature in a 10 days project? estimates are needed to take decisions now for situations that is going to happen in the future, the decision has to be made RIGHT NOW. So what is the decision we are trying to make here? The client\u0026rsquo;s answer was “I would build feature x differently”, so it was the “How”; how should we build feature x? should we take shortcuts? should we cut scope?\nOf course we need this decision, but do we need it NOW? as we said it is so expensive; we are in dispute and remember it\u0026rsquo;s 17-50%!\nHow can we solve this? the answer “I don\u0026rsquo;t need this decision right now”, and hence I don\u0026rsquo;t need estimating it! but how did I come to this conclusion? How did I know that I don\u0026rsquo;t need it? by examining the rest of the features; if all the other features are so basic, of a higher importance, and on which there was no dispute,… then I can push feature x to the end of the project, and only when I start implementing it I would revisit my decision of how to do it. By that I will have had proper picture of how things are going and would be able to decide how to build it without the fear of messing up the whole project, and without delaying it by wasting time in estimating, “it is going to take what it is going to take”.\nLet\u0026rsquo;s take an example.\nIn every morning I do four things:\n1- wash my face\n2- iron my shirt\n3- pack my laptop\n4- pack my lunch\nI know exactly how long each of these tasks take, except for number 2; it depends on the fabric of the shirt, the performance of the iron…etc. Now, when I wake up I need to estimate how long these tasks take so I can “decide” whether to call my employer and inform him that I\u0026rsquo;d be late or not. In order to do that I would sit and think “hmm…how much time would ironing my shirt take me? if my blue shirt is already washed then it would be good because it\u0026rsquo;s the easiest to be ironed, but then the iron could need water, if I start filling it…” and I would spend god knows how long thinking of how much time ironing my shirt would take.\nInstead of doing all that, I prioritize; I push task 2 till the very end and then when I am ACTUALLY DOING the task, things are much more clear and I can DECIDE if I can iron my blue shirt, or take a shortcut by grabbing my white t-shirt, and eventually to call my employer or not.\nMaybe the following diagram would make the picture little bit more clear.\nYou can see from diagram 1.0 that having the ambiguous task in the middle puts all the subsequent tasks into risk.\nDiagram 2.0 shows that pushing the ambiguous task to the end mitigates the risks, and leaves the decision of how to build it just before it starts with much clearer vision.\nConclusion The highlight here is NOT about estimation, the highlight here is that every project is unique and should be assessed accordingly; before taking any step during the project ask yourself what value does it provide? what cost does it incur? is there other ways by which I can achieve my goal?\nHappy delivering 🙂\n","permalink":"https://emadashi.com/2014/06/not-another-post-about-estimation/","summary":"\u003cp\u003eI was involved in a project that was given 10 days to finish, the tight schedule was due to budget reasons.\u003c/p\u003e\n\u003cp\u003eThe client explained to me his requirements and then asked for an estimate for details. We stood in front of the whiteboard, broke down the features and then started estimating the time for these features, until we reached feature x.\u003c/p\u003e\n\u003cp\u003eIn my technical life I\u0026rsquo;ve been beaten by over-simplified requirements far too many times, so as simple as feature x sounded I strongly felt that it might stretch. Subsequently, this influenced my opinion of giving feature x three days, against which the client of course argued back.\u003c/p\u003e","title":"NOT Another Post About Estimation"},{"content":"It’s a crazy era for IT! everyday new concepts, libraries, products, and even languages are introduced; so many solutions for so many problems. It is indeed the era of specialization.\nThere is absolutely no way to grasp all this knowledge, specialization and concentration of knowledge has to occur, and we must choose a technology to specialize in. But… (You knew this was coming, didn’t you)… this is not good enough!\nBefore you jump on me and start yelling “But you just confessed; it’s impossible!”, let me explain.\nDifferent roles require different type of knowledge, depending on what? depending on the problem the role is supposed to solve; some problems are so deep and complicated that requires specific field knowledge as deep and as complicated. The solution to the problem lies in deeper knowledge.\nOn the other hand, some problems require little bit broader knowledge, because the solution of the problem might not be buried too deep; it might be hanging there closer to the surface, but little bit further on a related knowledge.\nAnd being the humans we are; weak, ignorant, and with short life span, we (as individuals) can either go deeper in specific field knowledge, or span wider in related fields knowledge, but rarely both.\nThe following diagram is my trial to draw this graphically:\nLet’s take Medical Science for example: Specialists and GPs (I really wanted to find a better example; GPs these days have a bad reputation!).\nThe Specialists role should solve problems that require deeper knowledge of the field, e.g. eye specialist, his knowledge is higher on the y axis, shorter on the x axis, something like the Orange line.\nOn the other hand, the GP’s role is NOT to solve too specific problems, the GP is needed as a hub; he/she needs a breadth of knowledge that will enable him to direct the patient to the right source of the solution, so he should span more on the x axis and lower on the y axis (something like the Green line). I guess this also applies for Software Consultants, maybe.\nBut what does all this mean? it means that in order for you, my dear reader, to become a successful professional, you have to figure out how your diagram should look like. How to do that I hear you say? three things you should be doing constantly to figure this out:\nnote:don’t try to draw the diagram per se, it’s only a metaphorical way to make the picture clearer in your mind\nDecide which field is the one you’d love to make your home? which field you’d want to spend most of your time growing in? When you find that, set it as your base, and then lay related fields in order according to relevance Think about your role, in general, what is the problem your role usually tries to solve? where in the diagram do the solutions usually lay? Update the diagram regularly; as time goes by, humanity advancement forces the axis\u0026rsquo;s to a zoom-like effect: we get deeper knowledge, and we have wider knowledge (as humanity), and so you have to know your capacity, and maintain a slope that covers the proper spans for your role. And as you may have discovered, the ways used to acquire the knowledge varies depending on the depth or breadth of the knowledge.\nHere are some, starting from deep knowledge to wide knowledge:\nTeaching Attending courses, detailed text books, and practice Videos and community sessions Articles and white papers Skimmed reading Reading titles only, and news on Twitter Finally, striking a balance between the depth of knowledge and the breadth of knowledge is not an easy task, but let me end with a key tip: I have noticed that most of the successful Software Consultants I have interacted with have a really good breadth of knowledge, and then they bet on their ability to dig deeper when needed.\nMay your diagram be the highest and widest .\n","permalink":"https://emadashi.com/2014/04/consultant-skills/","summary":"\u003cp\u003eIt’s a crazy era for IT! everyday new concepts, libraries, products, and even languages are introduced; so many solutions for so many problems. It is indeed the era of specialization.\u003c/p\u003e\n\u003cp\u003eThere is absolutely no way to grasp all this knowledge, specialization and concentration of knowledge has to occur, and we must choose a technology to specialize in. But… (You knew this was coming, didn’t you)… this is not good enough!\u003cbr\u003e\nBefore you jump on me and start yelling “\u003cem\u003eBut you just confessed; it’s impossible!\u003c/em\u003e”, let me explain.\u003c/p\u003e","title":"Consultant Skills: Knowledge Depth \u0026 Breadth"},{"content":"The 2nd main cause of buggy software (time pressure is #1), is laziness and boredom.\nEvery job in this life consists of a “core”, which is the most challenging and most exciting part of the job, and a “chore”, which is the boring and tedious part.\nLet’s take a chef as an example; he is an artist whose art is producing quality food, a process that involves mixing precisely-scaled ingredients, perfectly stirred on a period of time, or fried on the grill with an artistic movement…all are actions that the chef consider as crucial part (core) of the process producing the magnificent product of his.\nOn the other hand, the chef sometimes has to chop onion into xxx-small size of chops, a task that may be really boring to him (I wouldn’t blame him!). Being such a boring task, the chef is tempted to getaway with just xx-small size of chops; after all 95% of the meal preparation is there! So he ships the dish to the customer.\nThe customer tastes it, he generally likes it, but something is wrong…”ah!”, the customer discovers, “I am chewing pieces of onion!”. He almost rated the restaurant 4.5/5, but just that last bit ruined it!\n3/5 is the final rate.\nOk maybe I dwelled a lot in that example, but to some extent this is exactly what is happening with the software developer. The task consists of exciting bits of code (core) that itself is the crucial part of the solution that solves the business problem; challenging, exciting, and fun to do.\nOn the other hand, the developer has to do some boring and tedious coding along (chore): arranging resources, validation, checking for nulls, breaking code into concise functions, cleaning up removable bits, or disposing resources.\nAll these tasks are not inherently part of the core solution, but if not done properly… if the developer thought he could just getaway with xx-small chops of onions, … if he does that the software might still generally work, but it will be buggy and less of quality, which will increase the chance of customers’ disappointment, or even abandoning it for good.\nFinally, it is pretty safe to say that all the developers whom I thought were the best developers, they all did their chores ALL THE TIME, no excuses; all the tedious work mentioned above is done AND sufficient unit-tests is put to ensure it is done. Their joy of delivering bug-free software is higher than the joy of just solving the mind-stimulating core problem.\nDon’t be lazy\n","permalink":"https://emadashi.com/2014/03/on-building-quality-software/","summary":"\u003cp\u003e\u003ca href=\"http://emadashi.com/misc/images/Better-Quality-Software_FF92/onion-chops.jpg\"\u003e\u003cimg loading=\"lazy\" decoding=\"async\" title=\"onion-chops\" style=\"border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; float: right; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px\" border=\"0\" alt=\"onion-chops\" src=\"https://emadashi.com/misc/images/Better-Quality-Software_FF92/onion-chops_thumb.jpg\" width=\"244\" align=\"right\" height=\"151\" /\u003e\u003c/a\u003eThe 2nd main cause of buggy software (time pressure is #1), is laziness and boredom.\u003c/p\u003e\n\u003cp\u003eEvery job in this life consists of a “core”, which is the most challenging and most exciting part of the job, and a “chore”, which is the boring and tedious part.\u003cbr\u003e\nLet’s take a chef as an example; he is an artist whose art is producing quality food, a process that involves mixing precisely-scaled ingredients, perfectly stirred on a period of time, or fried on the grill with an artistic movement…all are actions that the chef consider as crucial part (core) of the process producing the magnificent product of his.\u003cbr\u003e\nOn the other hand, the chef sometimes has to chop onion into xxx-small size of chops, a task that may be really boring to him (I wouldn’t blame him!). Being such a boring task, the chef is tempted to getaway with just xx-small size of chops; after all 95% of the meal preparation is there! So he ships the dish to the customer.\u003cbr\u003e\nThe customer tastes it, he generally likes it, but something is wrong…”ah!”, the customer discovers, “I am chewing pieces of onion!”. He almost rated the restaurant 4.5/5, but just that last bit ruined it!\u003cbr\u003e\n3/5 is the final rate.\u003c/p\u003e","title":"On Building Quality Software"},{"content":"Most of jobs in our modern world come with a job definition; a list of tasks that is expected from the candidate to accomplish during his/her occupation of that role. Very convenient approach; setting expectations for both parties.\nA convenient approach indeed, but extremely dangerous as well! what is dangerous is NOT the job definition, rather the mentality it instills in the mind of the candidate.\nThe candidate examines the list of tasks, believes that he can do it, he takes the job, and once he starts in the new role he just fits into the gears of the existing environment/process, regardless of how rusty it is, or how inefficient the mechanics of these gears are! The environment or the process, part of which this role is, could be extremely malformed, inefficient, slow, or of any negative attribute you can stamp on a process that is not 100% fulfilling its goal. Just fitting into this system will make you part of this failure! But for innovators and positive influencers this is absolutely not acceptable.\nIf you examine any success story that happened within a process or an established environment, you will find that those who caused this success have actually revolted against that process at one point; they didn’t just accomplish “what expected” from them, they didn’t just accept the constraints as proven fact, on the contrary; they took one step back, went out of their specific “role”, analyzed, criticized, and then took a brave action to change.\nFitting into gears can be expected, to a certain degree, in situations where a job description consists of “rigid tasks”, but it can still happen to roles whose job description consists of “introducing change” (e.g. consultancy). But how can this happen? by:\nBeing overwhelmed by too many variables: a lot of things might be happening all at once in the environment we want to change, trying to solve all these at once will only result of waste of effort; it’s pretty simple and straightforward formula: x/y=z the bigger y is the less z is. And the solution is simple and straightforward too: focus on the highest priority, and traverse by time! Despair of change by rigid constraints: decision maker’s mentality, rigid environmental constraints, …etc. All of these can be solved by different ways depending on the nature of the constraint, but “despair” is the keyword here; once the one reach that stage, he has a serious problem. Despair should not be reached before many trials of corrections acts, and in all different ways, but once it is reached, action should be taken immediately; it’s absolutely not allowed to stay in this situation unless it’s a consciously-made decision. Otherwise, scenarios of escalation, or dropping off, should be valid. Time lapse: this is the most important point because it is so subtle; what starts as a trial to accommodate to a new environment/process on the promise of change in the “near” future, evolves into an acceptance of the ugly environment/process simply because we “got used to it”.\nThe best solution I’ve come across for this problem is talking to influencer people who change things to the better so often that you are constantly reminded that “change” and “making things better” is actually the real task to accomplish.\nIf you can’t find such people around you, just print yourself a paper “What can I do to make it better?” and stick this to your monitor! These three points are not the only ones, many things can also drive to the Fitting-into-gears scenario, though, I find these are the most common.\nOf course this doesn’t mean to revolt always and on anything, sometimes something is just right and better left intact.\nConclusion Don’t just fit into the gears, but step out, analyze, criticize, and change.\n","permalink":"https://emadashi.com/2014/02/dont-just-fit-into-the-gears/","summary":"\u003cp\u003e\u003ca href=\"http://emadashi.com/misc/images/Dont-Just-Fit-In-The-Gear_6AA0/rusty-gears2.jpg\"\u003e\u003cimg loading=\"lazy\" decoding=\"async\" title=\"rusty-gears2\" style=\"border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; float: right; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px\" border=\"0\" alt=\"rusty-gears2\" src=\"https://emadashi.com/misc/images/Dont-Just-Fit-In-The-Gear_6AA0/rusty-gears2_thumb.jpg\" width=\"164\" align=\"right\" height=\"260\" /\u003e\u003c/a\u003eMost of jobs in our modern world come with a job definition; a list of tasks that is expected from the candidate to accomplish during his/her occupation of that role. Very convenient approach; setting expectations for both parties.\u003c/p\u003e\n\u003cp\u003eA convenient approach indeed, but extremely dangerous as well! what is dangerous is NOT the job definition, rather the mentality it instills in the mind of the candidate.\u003cbr\u003e\nThe candidate examines the list of tasks, believes that he can do it, he takes the job, and once he starts in the new role he just fits into the gears of the existing environment/process, regardless of how rusty it is, or how inefficient the mechanics of these gears are! The environment or the process, part of which this role is, could be extremely malformed, inefficient, slow, or of any negative attribute you can stamp on a process that is not 100% fulfilling its goal. Just fitting into this system will make you part of this failure! But for innovators and positive influencers this is absolutely not acceptable.\u003c/p\u003e","title":"Don’t Just Fit Into The Gears"},{"content":"Update: @DavidEbbo checked the post and thankfully he notified me that we don’t need to use the RESTapi to add an environment variable to Kudu on Azure; we can use the AppSettings in the portal.\n——-\nKudu is a deployment engine that enables websites to deploy directly from git repository, it is the one behind git deployments in Azure Web Sites.\nTwo things I loved about Kudu: you can use it locally in your environments, and it is open source!\nThere are a lot of video’s and articles that explain how to use Kudu, the source is the Windows Azure Friday, just search for Kudu (using the search box under “Last Friday”, not the one in the header).\nIn this post I will explain how to do custom deployment with Kudu INCLUDING updating the database with Dbup (a library that tracks your change scripts and deploy them to your database accordingly), both locally and on Azure.\nThere are some prerequisites for this post, and I am not going to clutter the internet with repeated information; so you will need to know how to\nRun Kudu locally and how to do custom web site deployment. What are you waiting for, go watch the two videos!\nNow that you’re back, let’s see how we can update the database within our deployment.\nDeploying Locally So let’s add a console project “UpgradeDatabase” to the solution and add the Dbup nuget package to it so we can use that console app to manage our database updates.\nWe need to tell our console app which database we need to apply our change scripts to, we do this by passing the connection string as a parameter to the exe (just like the guide on Dbup main page):\nDon’t worry about the parameter for now, we will explain how to supply it later.\nGreat, now let’s go to the “deploy.cmd” batch file generated in video #2, this file is the batch file that Kudu will use to deploy our website, note here that if this file should be added to your repo so Kudu can retrieve and use to do the deployment, otherwise Kudu will use its default batch file.\nNow that we have the script in our hands, we need to edit it so we build the database project and execute the exe file passing the proper connection string so we can upgrade within the deployment.\nFirst, let’s edit “deploy.cmd” so it builds the project “UpgradeDatabse” we created above; we need to do this explicitly because Kudu builds the web project file only, and of course whatever dependencies the project has, but not all projects in your solution. So we add the following line just under the “Deployment” section in the file:\n::::::::::::::::::: snippet 1\necho Upgrading the database %MSBUILD_PATH% UpgradeDatabase\\UpgradeDatabase.csproj IF !ERRORLEVEL! NEQ 0 goto error ::::::::::::::::::\nVery simple! now that we have built the project we have the executable “UpgradeDatabase” generated, which will be run by our “deploy.cmd” to apply the changes to our database, so let’s add the following lines to the “deploy.cmd”:\n:::::::::::::::::: snippet 2\ncall %DEPLOYMENT_SOURCE%\\UpgradeDatabase\\bin\\debug\\UpgradeDatabase.exe %DatabaseToUpgrade% IF !ERRORLEVEL! NEQ 0 goto error\n::::::::::::::::::\nCouple of paragraphs above we said that we will pass the connection string as a parameter to the console app, and if you inspect snippet 2, you will find that we are actually passing an environment variable as the connection string named “DatabaseToUpgrade”, the question is where do we set this variable? this variable, and in fact all of the environment variables used in “deploy.cmd”, are set by Kudu. Thoughtfully, the team of Kudu have made available for us to edit (except few).\nSo let’s set this variable.\nIf you have followed video 1 above, which explains how to run Kudu locally, you have the local Kudu ready in your local machine, through the interface provided we can add the “DatabaseToUpgrade” variable; under the main page of the application you have created on Kudu –\u0026gt; go to the “Configuration” menu item –\u0026gt; Customer Properties –\u0026gt; and add the new variable to the list.\nNote: you have to escape the double quotes of your connection string with back lash \\\nNow that you have added the property with the proper connection string as a value (likely a database on your local machine), we are ready to push deploy, so now we push to the git repo in my local Kudu, you can get the Url from the Kudu interface.\ngit push http://localhost:4514/bunianlocally.git\nHopefully if everything is set right you will see your change script code executed and your database upgraded depending on the scripts you have put in your Dbup project.\nDeploying on Azure The good news is that we won’t have to do a lot; all what we have to do is to add the variable “DatabaseToUpgrade” to the environment variables on Kudu on Azure, but this time with the value of a connectionstring that refers to our live Database.\nThe problem is if you go to Azure interface you will find that there is no interface to add such a variable (at least according to my knowledge)! luckily though, and thanks to the Kudu team, we can add this variable through the RESTapi.\nSo we need to POST the variable “DatabaseToUpgrade” to the resource “settings”, of course the endpoint you will use to access this resource is the Kudu URL on your windows Azure account; you can find this it under your Azure website –\u0026gt; Configure –\u0026gt; and then scroll to Git URL.\nNOTE:The Kudu URL is the same URL but remove the last portion of the URL (i.e websitename.git).\nTo add the new key you can use any web client tool (curl, fiddler, …etc), so if I omit my personal authentication header, and using curl, the request should look like this:\ncurl –data \u0026ldquo;{‘DatabaseToUpgrade\u0026rsquo;:\u0026rsquo;liveDbConnectionString\u0026rsquo;}\u0026rdquo; http://localhost:4514/settings -H \u0026ldquo;Content-Type: application/json\u0026rdquo;\nOf course you will have to use the proper authentication to access to this resource, which should be your Azure ftp username and password for this website (at least up until the moment of writing this post). If you need to know how to construct an authentication header by Fiddler maybe this question on SoF might help.\nAnd voila! hopefully you have done it!\nThings to keep in mind The “deploy.cmd” file is in your repo, this means that anyone has access to your repo can have access to the file and change it. I could have kept the connection string in my app.config file and used a “switch” key rather than putting the connection string itself as a Kudu variable, but this means that I have to keep the real connection string in my code repository, making it visible to all the people who have access to the repo, which is not usually desirable! Depending the Visual Studio installations you have on your machine, and depending on the way you reference the web targets in your project file .csproj…depending on these two factors, the web targets might not be found during. So keep in mind that you can pass build arguments to MSbuild through Kudu. In my case, I had to pass the Visual Studio version to build upon like the following: Conclusion Kudu is awesome\nLet me know if you have any questions.\n","permalink":"https://emadashi.com/2014/01/update-database-with-dbup-when-deploying-with-kudu/","summary":"\u003cp\u003e\u003cstrong\u003eUpdate\u003c/strong\u003e: \u003ca href=\"https://twitter.com/davidebbo\"\u003e@DavidEbbo\u003c/a\u003e checked the post and thankfully he notified me that we don’t need to use the RESTapi to add an environment variable to Kudu on Azure; we can use the AppSettings in the portal.\u003c/p\u003e\n\u003cp\u003e——-\u003c/p\u003e\n\u003cp\u003e\u003ca href=\"https://github.com/projectkudu/kudu\"\u003eKudu\u003c/a\u003e is a deployment engine that enables websites to deploy directly from git repository, it is the one behind git deployments in Azure Web Sites.\u003cbr\u003e\nTwo things I loved about Kudu: you can use it locally in your environments, and it is open source!\u003c/p\u003e","title":"Update Database with Dbup When Deploying With Kudu"},{"content":"Yesterday I was playing with Kudu, the Azure websites deployment engine, and it was all fun and joy.\nWhile I was happily hitting the key strokes of joy enjoying the new cool stuff I implementing, I got an error, and shamefully the minute I saw the error I copied and pasted it to Google!\nFor my bad (and later good) luck, after opening two links from the search results I discovered that I am late; I have to hit the road, so I instantly closed my laptop, pushed it in my bag and ran.\nIn the train I thought I can continue investigating and use my mobile for tethering, the surprise was is that the train became full within minutes, and it was physically impossible to take my phone out of my jeans and juggle with my opened laptop.\n”Just great!” the sound in my head whispered… at that very moment I remembered Scott Hanselman’s post “Am I really a developer or just a good googler”, and that was my chance; I kept going on, no Google, no internet, just me, my brain, and the problem.\nBeing under such constrained situation, you instinctively squeeze your brain and your set of skills to find a solution; it becomes like Limitless the movie, things become slower, you can read better, and you simply “think” deeper.\nBefore I reached my final stop, I solved the problem! the rush of winning was indescribable.\nThe lesson learned is not about developing without Googling or having a reference, the lesson learned here is that the internet is merely a tool, it’s NOT your deposit of answers, it is NOT your remote brain; don’t make it think for you; YOU think first, and when you need information beyond your mental capabilities, only then use the internet.\nHappy programming.\n","permalink":"https://emadashi.com/2014/01/develop-without-googling/","summary":"\u003cp\u003e\u003ca href=\"http://emadashi.com/misc/images/28bec5ed4b53_F3E2/Google-Brain.jpg\"\u003e\u003cimg loading=\"lazy\" decoding=\"async\" title=\"Google-Brain\" style=\"border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; float: right; padding-top: 0px; padding-left: 0px; margin: 5px; border-left: 0px; display: inline; padding-right: 0px\" border=\"0\" alt=\"Google-Brain\" src=\"https://emadashi.com/misc/images/28bec5ed4b53_F3E2/Google-Brain_thumb.jpg\" width=\"244\" align=\"right\" height=\"166\" /\u003e\u003c/a\u003eYesterday I was playing with \u003ca href=\"https://github.com/projectkudu/kudu\"\u003eKudu\u003c/a\u003e, the Azure websites deployment engine, and it was all fun and joy.\u003c/p\u003e\n\u003cp\u003eWhile I was happily hitting the key strokes of joy enjoying the new cool stuff I implementing, I got an error, and shamefully the minute I saw the error I copied and pasted it to Google!\u003cbr\u003e\nFor my bad (and later good) luck, after opening two links from the search results I discovered that I am late; I have to hit the road, so I instantly closed my laptop, pushed it in my bag and ran.\u003c/p\u003e","title":"Develop without Googling"},{"content":" As software developers, we happen to come across many business problems with various complexity levels. Although this complexity depends on the nature of the domain sometimes, what I have noticed that product owners add a lot to this complexity themselves without a need!\nFor once, software developers are innocent here; the product owner, the entrepreneur, or the man behind the niche, these people have a very big responsibility on defining the complexity of the system; most of the time, the complexity introduced to the software was because they wanted to solve everything with a button, maybe two!\nLet’s take an example, let’s imagine that we want to create a vehicle, simple vehicle that transports people around, simple project with simple goal. But the product owner finds that this is too simple, and we will loose potential customers if that was the only functionality in the system!\nOk then, let’s add an arm to it just in case if other customers will need a vehicle to remove obstacles, yeah! that sounds good, now our customer base is larger, and this way the possibility of buying our product is larger.\nBut man! check how big the customer base is going to be if we just cover customer who need a vehicle that lifts people up to fix high points like street electricity bulbs, let’s add that to the vehicle…and the story goes on!\nIn theory more features is better, right? the problem is that once we bring something to existence, we bring the burden of managing its effect on the things that existed before, and a long with that the burden of managing the effect of the already existing things on it.\nAdding an arm to the vehicle will affect the balance, will increase the danger on the passengers, will increase its weight, and certainly having a big space of passengers will not make the work of arm easier.\nAnd this is exactly what happens with a system that tries to solve too many things, starts introducing too many features that affect each other greatly increasing complexity in magnitudes.\nI am not saying that you should make your project dead simple and not grow your product; what I am saying is that your project should solve one problem only, this problem can have many small needs and smaller goals, but adding any of these should be checked according to the following:\ncan you still use the same words as an answer for the question “what is your product trying to solve” after adding the feature? Is it an inherent part of the original solution? does it “complete” or does it “add”? If you have customers already, the majority of them might not be the ultimate reference to your decisions, but if the majority of them agree on a need, then most likely it is part of the problem your product is trying to solve. The counter point to point #3 above is that, your existing customers might be the pioneers who adopted your product, hence their further needs might be guest solutions to other problems they have that is NOT part of the problem your product is trying to solve; be alert not to be driven away from the original goal. As for you, my dear Technical Consultant, you have to keep your valuable input to this formula; your responsibility is not only to create what the product owner wants, your responsibility includes warning him, he might not understand the consequences of complicating the solution by trying to solve everything, we have much bigger clarity of the complexity being introduced than what he has; the loops, the decision code structure, the “special” cases, all this you can see very clearly. It is as much of a business problem as it is of a technical one.\nP.S. The awesome picture accompanied with this post (slightly edited) is from an inspirational blog post on mylifeinthetechworld , can be found here.\n","permalink":"https://emadashi.com/2013/11/complicated-software-or-solving-everything-at-once-message-to-product-owners/","summary":"\u003cp\u003e\u003ca href=\"http://emadashi.com/misc/images/ComplicatedSoftwareOrDoWeWantToSolveEver_10013/iPhone5doeseverythingcomic2.jpg\"\u003e\u003cimg loading=\"lazy\" decoding=\"async\" title=\"iPhone-5-does-everything-comic2\" style=\"border-top: 0px; border-right: 0px; border-bottom: 0px; margin: 10px 0px 0px 15px; border-left: 0px; display: inline\" border=\"0\" alt=\"iPhone-5-does-everything-comic2\" align=\"right\" src=\"https://emadashi.com/misc/images/ComplicatedSoftwareOrDoWeWantToSolveEver_10013/iPhone5doeseverythingcomic2_thumb.jpg\" width=\"314\" height=\"327\" /\u003e\u003c/a\u003e As software developers, we happen to come across many business problems with various complexity levels. Although this complexity depends on the nature of the domain sometimes, what I have noticed that product owners add a lot to this complexity themselves without a need!\u003c/p\u003e\n\u003cp\u003eFor once, software developers are innocent here; the product owner, the entrepreneur, or the man behind the niche, these people have a very big responsibility on defining the complexity of the system; most of the time, the complexity introduced to the software was because they wanted to solve everything with a button, maybe two!\u003c/p\u003e","title":"Complicated Software? Or Solving Everything At Once? Message To Product Owners"},{"content":"Last week I got the chance to speak on the Victoria .net user group, presenting OAuth authentication (and authentication in general) in the new .net web world of OWIN.\nYou can find below the link to the source code, the presentation slides, and the video on Youtube.\nSource code on GitHub\nFor some reason the animation doesn’t work on Slideshare, maybe because it was Office 2013\nOAuth in the new .NET world (OWIN) from Emad Alashi Enjoy 🙂\n","permalink":"https://emadashi.com/2013/11/oauth-authentication-in-owin/","summary":"\u003cp\u003eLast week I got the chance to speak on the Victoria .net user group, presenting OAuth authentication (and authentication in general) in the new .net web world of OWIN.\u003cbr\u003e\nYou can find below the link to the source code, the presentation slides, and the video on Youtube.\u003c/p\u003e\n\u003cp\u003e\u003ca href=\"https://github.com/eashi/Samples/tree/master/OAuthSample\"\u003eSource code on GitHub\u003c/a\u003e\u003c/p\u003e\n\u003cp\u003eFor some reason the animation doesn’t work on Slideshare, maybe because it was Office 2013\u003c/p\u003e\n\u003cdiv style=\"margin-bottom: 5px\"\u003e\n  \u003cstrong\u003e\u003ca title=\"OAuth in the new .NET world (OWIN)\" href=\"https://www.slideshare.net/splashup/o-auth-20dotnetandowin\" target=\"_blank\"\u003eOAuth in the new .NET world (OWIN)\u003c/a\u003e \u003c/strong\u003efrom \u003cstrong\u003e\u003ca href=\"http://www.slideshare.net/splashup\" target=\"_blank\"\u003eEmad Alashi\u003c/a\u003e\u003c/strong\u003e\n\u003c/div\u003e\n\u003cp\u003eEnjoy 🙂\u003c/p\u003e","title":"OAuth Authentication in OWIN"},{"content":"You have to listen to two words only before Cristian Prieto grasp your attention till the very end of his talk, even if it was about cats! everybody just goes silent, listening carefully, staring and waiting for more!…and the secret behind it, as I see it, is HE IS A PERFECT STORY-TELLER!\nLet’s face it, people like stories; we watch movies, we read novels, even news sounds much more interesting when there is a “story” behind it! it is the nature of humans.\nAs a consultant you want to affect clients and change them to be better: their practices, their way of thinking, their skills… all what you can make better, and the key to all this, my dear reader, is getting their attention! make them aware, make them realize, and what better than a story to do that!\nAnd yes, even the most boring technical idea can be turned into a very interesting story! watching the great story-tellers, I have noticed they have these elements in their talks:\nHave a beginning: a “Once upon a time” phrase that is suitable for the idea.\nExamples: “In 2003 at the beginning times of .net, programmers used to…” or, “When the WCF team thought about adding x to the library, there was no…”. Create a knot: where the peak of the story is formed, either a big problem that will be resolved by the end of your talk, or a very pleasant atmosphere that is going to be ruined by a sad end of your talk too! (IT industry is full of that, isn’t it ;))\nExamples: “…developers started using more and more config files, XML was everywhere! misspellings, malformed files, different schema versions…it was crazy!”, or “…the feature really solved a problem, everybody felt good about it because it was just simple!…” Teaser questions, and involve the audience.\nExamples: “…and guess what they suggested to solve this?”, or “What would you if you were in the teamleader’s shoes?” Use profound words with vocal emphasis, but avoid misleading exaggerations.\nExamples: “They wiped EEVVEEEEERYTHING they had on the database” Use hand and body gestures: the more you are involved with the story you are telling, the more effect it is going to have on the audience.\nExample: when you say for example “they wiped the structure of the database” make a gesture with your hand that expresses that. (make sure you don’t offend anyone by any EHM gesture! :P) Conclude with confidence.\nExamples: “..and THAT my friend what made this feature so unusable in the latest version” On a side note though, this is a talent that you need to practice a lot, and it is NOT easy at all! some people just have it by nature like Cristian, but for the rest of us, we need to practice hard!\n","permalink":"https://emadashi.com/2013/06/consultants-skills-story-telling/","summary":"\u003cp\u003eYou have to listen to two words only before \u003ca href=\"https://twitter.com/cprieto\"\u003eCristian Prieto\u003c/a\u003e grasp your attention till the very end of his talk, even if it was about cats! everybody just goes silent, listening carefully, staring and waiting for more!…and the secret behind it, as I see it, is HE IS A PERFECT STORY-TELLER!\u003cbr\u003e\nLet’s face it, people like stories; we watch movies, we read novels, even news sounds much more interesting when there is a “story” behind it! it is the nature of humans.\u003c/p\u003e","title":"Consultants’ Skills: Story Telling"},{"content":"Last week I delivered my first talk in Melbourne: “ASP.NET Routing \u0026amp; MVC” with the .net user group VIC.NET.\nEven though there was a problem with time control due to reasons out of hand, the audience stayed till the very end of the presentation; good to know that the presentation didn’t suck that much :D.\nHere are the slides: https://www.slideshare.net/slideshow/aspnet-routing-mvc/15438666\n","permalink":"https://emadashi.com/2012/12/asp-net-routing-mvc-presentation/","summary":"\u003cp\u003eLast week I delivered my first talk in Melbourne: “ASP.NET Routing \u0026amp; MVC” with the .net user group VIC.NET.\u003cbr\u003e\nEven though there was a problem with time control due to reasons out of hand, the audience stayed till the very end of the presentation; good to know that the presentation didn’t suck that much :D.\u003c/p\u003e\n\u003cp\u003eHere are the slides: \u003ca href=\"https://www.slideshare.net/slideshow/aspnet-routing-mvc/15438666\"\u003ehttps://www.slideshare.net/slideshow/aspnet-routing-mvc/15438666\u003c/a\u003e\u003c/p\u003e","title":"ASP.NET Routing \u0026 MVC Presentation"},{"content":"If you are in the software industry, you HAVE to read, read, and read; and it’s not only the “of course reading is essential”, it’s a matter of life and death…of your career!\nAnd there is tons of material every day: books, blogs, news, articles,….etc., so how to manage? of course is Speed Reading.\nOnce you master it, yes…you will use it for every reading situation, and at this point, my dear reader, you start doing it wrong!\nIt is a tool like every tool we have; suitable for some scenarios, and not suitable for others!\nFor example, it’s good for the following scenarios:\nUnrelated topic: You are a web developer on the .net stack, and your feed reader brings you an article about 3D printing, cool stuff, but is it worth investing your time on? probably not Filtering: You are looking for something, and you found too many articles in search results, so you filter them out and check which ones are worth thorough reading by speed reading Extreme situation: someone pointed a gun on your head and ordered you to hack a bank system within 30 seconds and you are allowed to use Google… ok maybe less serious situations but you got the point And sometimes you just need to read really really slow! every letter, every word, and every statement probably several times, you need to “absorb” the meaning, to think it over, to go deep with the details, to comprehend, cases like:\nApplying: if you are going to use what you read to write code! never write a code after speed reading! you have to absolutely understand what your line of code is doing, and whether it is suitable for your case compared to the case of the article. Judging: you want to buy a product, or want to know how to deal with someone/something/situation, you want to reply/comment on his article…etc. You need to have enough solid information in order to come to a conclusion on how to deal with it, you should NEVER judge or conclude on basis of speed reading. Dealing with Sales/Marketing/Government/Agreements/Contracts: especially if it was an ad with extremely small text at the bottom that nukes the value of the ad up side down conclusion: sometimes, you have to read slowly\n","permalink":"https://emadashi.com/2012/11/speed-reading-is-nicebut/","summary":"\u003cp\u003eIf you are in the software industry, you HAVE to read, read, and read; and it’s not only the “of course reading is essential”, it’s a matter of life and death…of your career!\u003cbr\u003e\nAnd there is tons of material every day: books, blogs, news, articles,….etc., so how to manage? of course is \u003ca href=\"http://en.wikipedia.org/wiki/Speed_reading\" target=\"_blank\"\u003eSpeed Reading\u003c/a\u003e.\u003c/p\u003e\n\u003cp\u003eOnce you master it, yes…you will use it for every reading situation, and at this point, my dear reader, you start doing it wrong!\u003cbr\u003e\nIt is a tool like every tool we have; suitable for some scenarios, and not suitable for others!\u003cbr\u003e\nFor example, it’s good for the following scenarios:\u003c/p\u003e","title":"Speed Reading Is Nice…But"},{"content":"There are couple of posts talking about this subject: when you have multiple process’s with the same name, it’s not straightforward to figure out which performance counter instance represents which process. The suggestion would be to use the process ID and the “ID Process” performance counter (This is not the essence of this post, if you know this already scroll down).\nTo explain this further let’s say we have two web applications with two different application pools that we wish to monitor their consumption of memory (though probably there are better ways to do it). The worker process for a web application on IIS is a w3wp.exe process, so for our two web applications we will have two w3wp.exe process’s running like the following:\nWhen you want to create a performance counter for these processes, the Performance Monitor will use the name of the process as the name of the performance counter instance for first process only, as for the rest of the processes who got the same name, for each of these processes, the Performance Monitor will assign a suffix \u0026ldquo;#N\u0026rdquo; to the name of the instance, like the following:\nBut how to figure out which one is which? the answer as we stated in the introduction is to use the “ID Process” performance counter:\nAnd here is a Stackoverflow answer that describes how to do it programmatically.\nNow is my problem! and this is the essence of this post; what if the process “4468”, which is monitored by the performance counter instance “w3wp”, died? you’d think that the performance counter “w3wp” dies with it and the performance counter “w3wp#1” will still be there monitoring process **“**3744”….well….WRONG!\nWhat will happen is that counters will shift by one counter up; the counter “w3wp#1” ****will disappear, and w3wp will pickup up process “3744”:\nWhich will mess all your readings up!\nSo the conclusion is that if you have multiple processes with the same name, and you want to monitor them in Performance Monitor, pay attention to the “ID Process” performance counter; if it changed (which means one of the processes died) then consider that all your subsequent readings are wrong. And if if you are doing it programmatically, I suggest to create the performance counter just before you want to read it; don’t hold on too long for a performance counter instance after creation.\n","permalink":"https://emadashi.com/2012/10/performance-counters-for-multiple-processes-with-same-name/","summary":"\u003cp\u003eThere are couple of posts talking about this subject: when you have multiple process’s with the same name, it’s not straightforward to figure out which performance counter instance represents which process. The suggestion would be to use the process ID and the “ID Process” performance counter (This is not the essence of this post, if you know this already scroll down).\u003c/p\u003e\n\u003cp\u003eTo explain this further let’s say we have two web applications with two different application pools that we wish to monitor their consumption of memory (though probably there are better ways to do it). The worker process for a web application on IIS is a w3wp.exe process, so for our two web applications we will have two w3wp.exe process’s running like the following:\u003c/p\u003e","title":"Performance Counters For Multiple Processes With Same Name"},{"content":"Update: In addition to this post, you can check as well the valuable post of Stuart Cullinans\u0026rsquo;s.\nOne of the recent projects I worked on involved managing IIS programmatically, and I found the proper tool for it, meet “Microsoft.Web.Administration”.\nYou can read about this library\u0026rsquo;s purpose in its own page above; what I will list here are three points I noticed while dealing with the library:\nI couldn’t find where to download, or install the library from, it appeared to be residing in “C:\\Windows\\SysWOW64\\inetsrv\\Microsoft.Web.Administration.dll” and yes my OS is 64-bit I am not sure where you can find that on a 32-bit machine The main class ServerManager reads data the moment it’s created only, it will NOT maintain a valid state after the initial read; for example, consider the following snippet: static WorkerProcess currentWP; static void Main(string[] args) { currentWP = new ServerManager().ApplicationPools[0].WorkerProcesses[0]; while (!Console.ReadLine().Equals(\u0026#34;quit\u0026#34;)) { Console.WriteLine(currentWP.ProcessId.ToString()); } } This code snippet will get the first WorkerProcess of the first Application Pool in the local IIS. Run the code, enter bogus input just to make sure the loop works, and you will find on the Console the W3WP Process Id displayed (e.g. 4295).\nNow open the Task Manager and kill that process, run the loop again you will find that the process ID is still being displayed, even though the process itself is gone!\nThe way you think this would act is to throw an exception when you access a property of the object after it’s invalidated, this doesn’t happen!\nSo you have to be careful not to hold for this library’s objects for long; for accurate reading, create them just before you need them.\nServerManager is expensive! make sure you use the \u0026ldquo;using\u0026rdquo; block in order to dispose it after you’re done with it. I believe these three notes could be in any library that have access to resources on the machine, so you better keep that in mind for any other library of the like.\n","permalink":"https://emadashi.com/2012/09/microsoft-web-administration-for-iis/","summary":"\u003cp\u003e\u003cstrong\u003eUpdate\u003c/strong\u003e: In addition to this post, you can check as well the valuable \u003ca href=\"http://stuartcullinan.blogspot.com.au/2011/04/some-tips-on-using-microsoftwebadminist.html\"\u003epost\u003c/a\u003e of Stuart Cullinans\u0026rsquo;s.\u003c/p\u003e\n\u003cp\u003eOne of the recent projects I worked on involved managing IIS programmatically, and I found the proper tool for it, meet “\u003ca href=\"http://msdn.microsoft.com/en-us/library/microsoft.web.administration%28v=vs.90%29.aspx\"\u003eMicrosoft.Web.Administration\u003c/a\u003e”.\u003c/p\u003e\n\u003cp\u003eYou can read about this library\u0026rsquo;s purpose in its own page above; what I will list here are three points I noticed while dealing with the library:\u003c/p\u003e\n\u003col\u003e\n\u003cli\u003eI couldn’t find where to download, or install the library from, it appeared to be residing in “\u003cstrong\u003eC:\\Windows\\SysWOW64\\inetsrv\\Microsoft.Web.Administration.dll\u003c/strong\u003e” and yes my OS is 64-bit I am not sure where you can find that on a 32-bit machine\u003c/li\u003e\n\u003cli\u003eThe main class \u003cstrong\u003eServerManager\u003c/strong\u003e reads data the moment it’s created only, it will \u003cstrong\u003eNOT\u003c/strong\u003e maintain a valid state after the initial read; for example, consider the following snippet:\u003c/li\u003e\n\u003c/ol\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-csharp\" data-lang=\"csharp\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#66d9ef\"\u003estatic\u003c/span\u003e WorkerProcess currentWP;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#66d9ef\"\u003estatic\u003c/span\u003e \u003cspan style=\"color:#66d9ef\"\u003evoid\u003c/span\u003e Main(\u003cspan style=\"color:#66d9ef\"\u003estring\u003c/span\u003e[] args)\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e{\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    currentWP = \u003cspan style=\"color:#66d9ef\"\u003enew\u003c/span\u003e ServerManager().ApplicationPools[\u003cspan style=\"color:#ae81ff\"\u003e0\u003c/span\u003e].WorkerProcesses[\u003cspan style=\"color:#ae81ff\"\u003e0\u003c/span\u003e];\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    \u003cspan style=\"color:#66d9ef\"\u003ewhile\u003c/span\u003e (!Console.ReadLine().Equals(\u003cspan style=\"color:#e6db74\"\u003e\u0026#34;quit\u0026#34;\u003c/span\u003e))\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    {\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e        Console.WriteLine(currentWP.ProcessId.ToString());\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    }\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e}\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cp\u003eThis code snippet will get the first WorkerProcess of the first Application Pool in the local IIS. Run the code, enter bogus input just to make sure the loop works, and you will find on the Console the W3WP Process Id displayed (e.g. 4295).\u003c/p\u003e","title":"Microsoft.Web.Administration for IIS"},{"content":"And finally I have the time to post about my new job, yes I changed jobs and now it\u0026rsquo;s Readify.\nI have never seen anything like it! Readify\u0026rsquo;s consultants are the top professionals in the IT industry working on the Microsoft stack; when I step in the office every morning, I sit in a room in which there are two MVP\u0026rsquo;s (of 12 MVP’s work in Readify already!), two book authors and user group leads, couple of speakers, and many silent geniuses. And I am drinking knowledge from a fire hose!\nActually I was about to list some of the distinguished Readify consultants here, and I found myself listing them all! so just check Readify’s employees list on linkedin here, and you will see what I am talking about!\nIn addition to that Readify is a leading company in sponsoring technical community activities; it’s been only 40 days and I have attended several community events that if not sponsored by Readify then at least you will find couple of speakers are Readify employees. Like Readify Dev Day, and DDDMelbourne\nAnd you know what? if you live outside Australia and willing to move into Australia, guess what, you can be part of all of this! Readify supports International Candidates, if you love software and you find yourself having a geek career, then you don’t want to miss this opportunity, apply now!\nDid I mention that Readify is 27th of the top 50 Best Places to Work in Australia? 😉\nCheck Readify’s presence online:\nFacebook, Twitter, and Google Plus\n","permalink":"https://emadashi.com/2012/08/working-for-readify/","summary":"\u003cp\u003eAnd finally I have the time to post about my new job, yes I changed jobs and now it\u0026rsquo;s \u003ca href=\"http://www.readify.net\"\u003eReadify\u003c/a\u003e.\u003ca href=\"http://www.readify.net\"\u003e\u003cimg decoding=\"async\" style=\"margin: 10px 0px 10px 10px; display: inline\" align=\"right\" src=\"https://www.emadashi.com/misc/images/Readify_Logo.jpg\" /\u003e\u003c/img\u003e\u003c/a\u003e\u003c/p\u003e\n\u003cp\u003eI have never seen anything like it! Readify\u0026rsquo;s consultants are the top professionals in the IT industry working on the Microsoft stack; when I step in the office every morning, I sit in a room in which there are two MVP\u0026rsquo;s (of 12 MVP’s work in Readify already!), two book authors and user group leads, couple of speakers, and many silent geniuses. And I am drinking knowledge from a fire hose!\u003c/p\u003e","title":"Working for Readify"},{"content":"I have installed the latest Parallels update and created a new Windows 8 virtual machine.\nBeing in all-touch universe right now, the guys behind Windows 8 decided to use corners of the screen to do certain actions like showing Start, active applications, or the settings flay-out.\nThe issue is that I couldn’t use these corners because Parallels menu would pop up the minute your mouse touches the top edge!\nMy work around was to enable “Active Screen Corners” on Parallels for my virtual machine and then assign them to nothing, access it by going to Configure \u0026gt; Full Screen. Check the following screen shot:\nThe other thing I faced is that Ctrl+arrow key combination is used in Mac for the Mission Control, so I am not able to use the Ctrl to traverse between words in a text block, the work around for this is to disable the Mac shortcuts of Mission Control, Settings \u0026gt; Keyboard \u0026gt; Mission Control\n","permalink":"https://emadashi.com/2012/07/working-with-windows-8-on-parallels-7/","summary":"\u003cp\u003eI have installed the latest Parallels update and created a new Windows 8 virtual machine.\u003c/p\u003e\n\u003cp\u003eBeing in all-touch universe right now, the guys behind Windows 8 decided to use corners of the screen to do certain actions like showing Start, active applications, or the settings flay-out.\u003cbr\u003e\nThe issue is that I couldn’t use these corners because Parallels menu would pop up the minute your mouse touches the top edge!\u003c/p\u003e\n\u003cp\u003eMy work around was to enable “Active Screen Corners” on Parallels for my virtual machine and then assign them to nothing, access it by going to Configure \u0026gt; Full Screen. Check the following screen shot:\u003c/p\u003e","title":"Working with Windows 8 on Parallels 7"},{"content":"The ASP.NET MVC team made our lives easier when they created the Html editor extension method Html.EditoFor(); you just pass the model property and it creates the right editor, filling it with the property’s value…but not always!\nLet’s consider that we have the conventional route definition:\nroutes.MapRoute( \u0026#34;Default\u0026#34;, // Route name \u0026#34;{controller}/{action}/{id}\u0026#34;, // URL with parameters new { controller = \u0026#34;Home\u0026#34;, action = \u0026#34;Index\u0026#34;, id = UrlParameter.Optional } // Parameter defaults ); and this simple action method:\npublic ActionResult MyAction(int? id) { var result = new Person() { Id = 3, Name = \u0026#34;My Name\u0026#34; }; return View(result); } and this form view:\n@using (Html.BeginForm()) { @Html.EditorFor(m =\u0026gt; m.Id) \u0026lt;br /\u0026gt; @Html.EditorFor(m =\u0026gt; m.Name) \u0026lt;br /\u0026gt; \u0026lt;input type=\u0026#34;submit\u0026#34; value=\u0026#34;Submit\u0026#34; /\u0026gt; } If you have noticed, in the action method “MyAction” I didn’t make use of the passed “id” parameter; I know this is a rare case, but maybe for a rare business scenario you want to return a very similar model rather than the requested one. In our case we will return the model with the id = 3 no matter what, just for the sake of the argument. Now if you call for the request “http://localhost:2085/MyController/MyAction” everything works as expected, and you will have the following view result: But if you call for the request “http://localhost:2085/MyController/MyAction/5”, the result will be: As you have noticed, the Html.EditorFor ignored the value of the property “id” in the model, and instead used the RouteData value of the key “id” passed through the URL. Most likely this is by design; I can’t think of how a bug in the code could produce this. But according to how I see things, this can be really confusing; I should be expecting the value of the property I passed instead of the routedata value. What do YOU think? ","permalink":"https://emadashi.com/2012/05/html-editorfor-model-property-vs-routedata-value/","summary":"\u003cp\u003eThe ASP.NET MVC team made our lives easier when they created the Html editor extension method \u003cem\u003e\u003ca href=\"http://msdn.microsoft.com/en-us/library/system.web.mvc.html.editorextensions.editorfor.aspx\" target=\"_blank\"\u003eHtml.EditoFor()\u003c/a\u003e;\u003c/em\u003e you just pass the model property and it creates the right editor, filling it with the property’s value…but not always!\u003c/p\u003e\n\u003cp\u003eLet’s consider that we have the conventional route definition:\u003c/p\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-csharp\" data-lang=\"csharp\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eroutes.MapRoute(\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    \u003cspan style=\"color:#e6db74\"\u003e\u0026#34;Default\u0026#34;\u003c/span\u003e, \u003cspan style=\"color:#75715e\"\u003e// Route name\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    \u003cspan style=\"color:#e6db74\"\u003e\u0026#34;{controller}/{action}/{id}\u0026#34;\u003c/span\u003e, \u003cspan style=\"color:#75715e\"\u003e// URL with parameters\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    \u003cspan style=\"color:#66d9ef\"\u003enew\u003c/span\u003e { controller = \u003cspan style=\"color:#e6db74\"\u003e\u0026#34;Home\u0026#34;\u003c/span\u003e, action = \u003cspan style=\"color:#e6db74\"\u003e\u0026#34;Index\u0026#34;\u003c/span\u003e, id = UrlParameter.Optional } \u003cspan style=\"color:#75715e\"\u003e// Parameter defaults\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e);\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cp\u003eand this simple action method:\u003c/p\u003e","title":"Html.EditorFor, Model Property vs RouteData Value"},{"content":" ثلاثاء عمان التقني لمن لا يعرفه هو لقاء تقني يعقد كل أول يوم ثلاثاء من كل شهر، يتناول مواضيع مختلفة في كل مرة تحوم كلها حول التقنية و استخداماتها، يتم فيه استضافة متخصصين في موضوع تقني معين يطرحون آراءهم في أهم المستجدات في الموضوع المختار أمام جمهور كبير من المتحمسين. يقوده طليعة من الشباب الفطن الجاد. و صادف الثلاثاء الماضي الذكرى الثانية لثلاثاء عمان التقني، الذي أقاموا فيه معرضا للشركات الناشئة، و الذي كنت من المحظوظين بزيارته.\nبصراحة لم أكن أتوقع ما رأيت؛ أكشاك متراصة لشركات ناشئة ذات حماس منقطع النظير! و لم يكن الحماس فقط ما ميزها، بل المستوى العالي من الاحترافية في منتجاتهم و خدماتهم –لأغلبها- و وضوح الرؤية، و بعد النظر، و إدراك السوق، و استيعاب فكرة التميز عن الأخرين في خصائص الخدمات، و قدرتهم على عرضها بشكل غير تقليدي و بجاذبية ملفتة للنظر.بالإضافة لبعض الأفكار الإلكتورنية الملموسة مثل “مجس الغاز” (تعريبي الخاص) و التحكم بالآلة من خلال Kinect.\nفاجأني كل هذا و شعرت بفخر و أمل كبيرين. كنت أمر على الكشك و أستعرض خدمة الشركة الناشئة و ما تقدم، و من ثم أبادر بأسئلة أتحدى فيها وجودهم مثل : “كيف تتميزون عن غيركم و هناك من يعرض خدماتكم نفسها؟ ماذا لو كنت زبونا عندكم و حصل معي كذا، كيف تستجيبون لمثل هذا الإشكال؟ كيف أضمن جودة خدماتكم؟ ما هي خطوتكم التالية و ما هي رؤيتكم؟” و في المعظم كانت أجوبة متينة بالنسبة لشركة ناشئة، تظهر مدى تمسكهم و جديتهم بالاستمرار و النجاح. و لكن لا بد أيضا من سرد بعض الملاحظات و النصائح، و ها هي قائمتي: كان هناك أكشاك فارغة بأسماء شركات ناشئة لم تستغل فرصتها و لم تحضر المعرض، أضاعوا فرصة كبيرة لتسويق خدماتهم و شركاتهم، و أضاعوا الفرصة على غيرهم، و يشكك هذا بقدرتهم أصلا على إنتاج خدمات يستطيع الزبائن الثقة بها و الاعتماد عليها إذا كنت صاحب كشك في معرض، لا تنتظر أن يتقدم أحدهم فيسأل، بادر أنت باستضافته، أظهر له الحماسة و الاهتمام به؛ إذا لم تكن مهتما و أنت صاحب الفكرة، فهل سيهتم عابر سبيل؟ رأيت أثر هذا علي مباشرة و أنا أمشي بين الأكشاك إذا كنت صاحب كشك في معرض، لا تجعل بينك و بين الزوار حاجزا كطاولة مثلا، فأنت “مع” الزائر “أمام” المنتج، أنت في صفه و حليفه، و لست في الطرف الآخر، يبدو أمرا سخيفا لكن في الواقع له أهمية نفسية كبيرة الألوان و التصاميم الجذابة تزداد أهمية يوما بعد يوم، و أثرها جد واضح في تكاثر الناس حولها. ابتعد عن التصاميم “الصلبة” التقليدية للشركات الكبرى، الآن عصر “الكاجوال” نوعا ما، لكن باتزان من الأفضل أن تستثمر قليلا بالأوراق الدعائية، طباعة ذات جودة جيدة مع ألوان أفضل بكثير من A4 أبيض و أسود استخدام الأفكار الجديدة في جلب الانتباه أمر جميل، لكن احذر من أن تكون مخترفة للخصوصية، أو مبهمة بحيت يتردد الزائر من الاشتراك فيها، فلن أقف لأتصور و أنا أرسم رسمة لا أفهم المغزى من رسمي لها دون أن تشرح لي (اسحب ورقة وارسمها) لماذا؟ كيف سيفيد هذا في دعايتكم و تعريفنا بكم و بخدمتكم؟ أنت لست بائعا متجولا، لا تختر طريقة عرض رتيبة و بكلمات مصطنعة مرتبة، كن تلقائيا و لتكن كلماتك من القلب، بعضهم نجح في ذلك حتى أنني وجدت أنه من اللائق أن أغادر كشكهم لأني أخذت من وقتهم و من وقت المهتمين الأخرين، لم أرد أترك المكان بسهولة و أخيرا إذا كنت زائرا لمعرض، فاعلم أن وقتك ثمين، وستتعب من المشي، و حضر نفسك لحمل الكثير من الأوراق الداعئية التي ستثقل كاهلك شكرا للقائمين على ثلاثاء عمان التقني، أبدعتم كالعادة و أكدتم أن الشباب العربي لديه القدرة، و الحماسة، و التصميم على إنتاج خدمات و شركات ذات جودة و رؤية ناضجة. شكرا شكرا. ملاحظة 1: في اللحظة التي سأحصل فيها على قائمة المشاركين سأجدد هذه التدوينة و أدرجها فيها، على كل حال الصورة في الأسفل تظهر بعضها ملاحظة 2: للأسف لم يتسن لي التقاط صور للمعرض، فسأكتفي بهذه الصورة التي تعرض بعض الأوراق الدعائية منه. ","permalink":"https://emadashi.com/2012/05/%D8%AB%D9%84%D8%A7%D8%AB%D8%A7%D8%A1-%D8%B9%D9%85%D8%A7%D9%86-%D8%A7%D9%84%D8%AA%D9%82%D9%86%D9%8A-%D8%A7%D9%84%D8%B0%D9%83%D8%B1%D9%89-%D8%A7%D9%84%D8%AB%D8%A7%D9%86%D9%8A%D8%A9/","summary":"\u003cdiv dir=\"rtl\"\u003e\n  \u003cp align=\"right\"\u003e\n    \u003ca href=\"http://www.ammantt.com\"\u003e\u003cimg loading=\"lazy\" decoding=\"async\" style=\"background-image: none; margin: 0px 7px 7px 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0pt none;\" title=\"548151_10150784486075210_599395209_11585084_1539081719_n\" src=\"https://emadashi.com/wp-content/uploads/dccc017246ce_B002/548151_10150784486075210_599395209_11585084_1539081719_n_thumb.jpg\" border=\"0\" alt=\"548151_10150784486075210_599395209_11585084_1539081719_n\" width=\"260\" height=\"190\" align=\"left\" /\u003e\u003c/a\u003e\u003ca href=\"http://ammantt.com/\" target=\"_blank\"\u003eثلاثاء عمان التقني\u003c/a\u003e لمن لا يعرفه هو لقاء تقني يعقد كل أول يوم ثلاثاء من كل شهر، يتناول مواضيع مختلفة في كل مرة تحوم كلها حول التقنية و استخداماتها، يتم فيه استضافة متخصصين في موضوع تقني معين يطرحون آراءهم في أهم المستجدات في الموضوع المختار أمام جمهور كبير من المتحمسين. يقوده طليعة من الشباب الفطن الجاد.\n  \u003c/p\u003e","title":"ثلاثاء عمان التقني – الذكرى الثانية"},{"content":"Let’s take the example:\n@Html.Action(\u0026#34;Latest\u0026#34;, \u0026#34;Episode\u0026#34;) What this will do is to invoke the “Latest” action method in the “Episode” controller. But what really happens behind the scenes is NOT a direct invoke; it will actually start from the beginning of the ASP.NET MVC execution pipeline using “Latest” and “Episode” as Route values for the keys “action” and “controller” respectively.\nThis means that you should pay very good attention to your Routes definition in the Application_Start() in Global.asax; Html.Action() will try to match the best route in your defined routes according to the RouteValueDictionary created above (action and controller) along with any additional route values provided in the overload.\nSo bottom line don’t assume that Html.Action will invoke action directly, and make sure that your Route unit tests always cover your back when you need to change your Route definitions, or your risk your Html.Action() methods to be ruined.\n","permalink":"https://emadashi.com/2012/03/how-html-action-work/","summary":"\u003cp\u003eLet’s take the example:\u003c/p\u003e\n\u003cpre tabindex=\"0\"\u003e\u003ccode class=\"language-razor\" data-lang=\"razor\"\u003e@Html.Action(\u0026#34;Latest\u0026#34;, \u0026#34;Episode\u0026#34;)\n\u003c/code\u003e\u003c/pre\u003e\u003cp\u003eWhat this will do is to invoke the “\u003cem\u003eLatest\u003c/em\u003e” action method in the “\u003cem\u003eEpisode\u003c/em\u003e” controller. But what really happens behind the scenes is NOT a direct invoke; it will actually start from the beginning of the ASP.NET MVC execution pipeline using “\u003cem\u003eLatest\u003c/em\u003e” and “\u003cem\u003eEpisode\u003c/em\u003e” as Route values for the keys “\u003cem\u003eaction\u003c/em\u003e” and “\u003cem\u003econtroller\u003c/em\u003e” respectively.\u003c/p\u003e\n\u003cp\u003eThis means that you should pay very good attention to your Routes definition in the Application_Start() in Global.asax; Html.Action() will try to match the best route in your defined routes according to the RouteValueDictionary created above (action and controller) along with any additional route values provided in the overload.\u003c/p\u003e","title":"How Html.Action() Work"},{"content":" Recently I had to go through some health checkup that included tests for my eye, one of these tests required from me to keep my eye open for a long period of time concentrating continuously into an extremely strong and annoying light. During the test I kept receiving encouraging words from the examining doctor every couple of seconds: “Bravo Emad! very good concentration, keep it up, that’s it”. Even though it was a simple task and me being in my 30’s!… I still had a strong feeling that I was doing something right! and that I should keep doing what I was doing, to give more effort no matter how annoying and hurting this intense light was; and all of this was due to his words! the more he encouraged the wider I opened my eye and concentrated. The moral of the story is that if you are managing people never ever under estimate the simple words of encouragement, or discouragement! ","permalink":"https://emadashi.com/2012/03/the-magical-effect-of-simple-encouraging-words/","summary":"\u003cp align=\"left\"\u003e\n  \u003ca href=\"http://school.discoveryeducation.com/clipart/clip/goodwork.html\" target=\"_blank\"\u003e\u003cimg loading=\"lazy\" decoding=\"async\" style=\"background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: right; border-top: 0px; border-right: 0px; padding-top: 0px\" title=\"image credit goes for www.discoveryeducation.com/\" border=\"0\" alt=\"image credit goes for www.discoveryeducation.com/\" align=\"right\" src=\"https://emadashi.com/wp-content/uploads/The-Magic-Effect-of-Simple-Encouraging-W_F1A0/goodwork.gif\" width=\"242\" height=\"190\" /\u003e\u003c/a\u003eRecently I had to go through some health checkup that included tests for my eye, one of these tests required from me to keep my eye open for a long period of time concentrating continuously into an extremely strong and annoying light. \u003cbr /\u003eDuring the test I kept receiving encouraging words from the examining doctor every couple of seconds: “Bravo Emad! very good concentration, keep it up, that’s it”. \u003cbr /\u003eEven though it was a simple task and me being in my 30’s!… I still had a strong feeling that I was doing something right! and that I should keep doing what I was doing, to give more effort no matter how annoying and hurting this intense light was; and all of this was due to his words! the more he encouraged the wider I opened my eye and concentrated.\n\u003c/p\u003e","title":"The Magical Effect of Simple Encouraging Words"},{"content":"Since Google changes the look of its products very often, most likely this post will be out of date soon, nonetheless I believe it’d be a good to share my thoughts about Google Reader’s current UI… with a little rant.\nLots of real-state waste: All the areas surrounded with yellow borders are wasted, especially that I have no control over hiding or showing them (click on image to see it real size):\nActions RARELY used are ALWAYS available, and taking too much space:\nActions most used are small, at the bottom of the post, and not always in view:\nThe highlight of the selected blog isn\u0026rsquo;t clear enough:\nTitle doesn\u0026rsquo;t stay in view while scrolling (negotiable):\nOk Google you did a great job introducing GMail and Reader with all this labeling and cool stuff, how about little bit attention to UI?\n","permalink":"https://emadashi.com/2012/03/criticizing-google-readers-ui/","summary":"\u003cp\u003eSince Google changes the look of its products very often, most likely this post will be out of date soon, nonetheless I believe it’d be a good to share my thoughts about Google Reader’s current UI… with a little rant.\u003c/p\u003e\n\u003col\u003e\n\u003cli\u003e\n\u003cp\u003e\u003cstrong\u003eLots of real-state waste:\u003c/strong\u003e All the areas surrounded with yellow borders are wasted, especially that I have no control over hiding or showing them (click on image to see it real size):\u003c/p\u003e","title":"Criticizing Google Reader’s UI"},{"content":"In a nutshell, a query string will not be part of the RouteData dictionary in the routing process, yet it will affect the route matching. On the other hand, when Model Binding takes place, query string will be used to bind to the parameters of the action method, unless there is an item in route data with the same key.\nNow the details. Let us consider this ASP.NET MVC application. We have an action method:\npublic ViewResult Archive(DateTime? dateFrom, int? page) { ... } And we have defined the following route:\nroutes.MapRoute( \u0026#34;Archive\u0026#34;, \u0026#34;Archive/{dateFrom}\u0026#34;, new { controller = \u0026#34;Episode\u0026#34;, action = \u0026#34;Archive\u0026#34;, dateFrom = UrlParameter.Optional } ); Let us check the URL ~/Archive/1-2-2012?page=2.\nThe RouteData dictionary will be as follows:\nKey Value controller Episode action Archive dateFrom 1-2-2012?page=2 Yet the action method above will work, and be invoked with the parameters:\nParameter Value dateFrom 1-2-2012 page 2 So notice the following:\nThe query string \u0026ldquo;page\u0026rdquo; key is NOT part of the RouteData dictionary. In the routing process, \u0026ldquo;?page=2\u0026rdquo; is considered to be part of the value of the \u0026ldquo;dateFrom\u0026rdquo; item in the RouteData dictionary (watch out for route unit tests). Even though \u0026ldquo;dateFrom\u0026rdquo; route item has the value \u0026ldquo;1-2-2012?page=2\u0026rdquo;, Model Binding figures out that it can ignore the \u0026ldquo;?page=2\u0026rdquo; part because it is a query string, and the dateFrom parameter is bound correctly to \u0026ldquo;1-2-2012\u0026rdquo;. Even though there is NO \u0026ldquo;page\u0026rdquo; item in the RouteData dictionary, the query string is still used in Model Binding to bind to the page parameter. Having this explained and the above notes in mind, what if we define an item named \u0026ldquo;page\u0026rdquo; in the route itself, like this:\nroutes.MapRoute( \u0026#34;Archive\u0026#34;, \u0026#34;Archive/{dateFrom}\u0026#34;, new { controller = \u0026#34;Episode\u0026#34;, action = \u0026#34;Archive\u0026#34;, dateFrom = UrlParameter.Optional, page = 1 } ); Then this item \u0026ldquo;page\u0026rdquo; will show in RouteData, but it should NOT be mistaken for the query string \u0026ldquo;page\u0026rdquo;. Model Binding will ignore the query string and use the route data item to bind to the action parameter page.\nAnd this is why I am writing this post:\nI mistook the route item \u0026ldquo;page\u0026rdquo; for the query string \u0026ldquo;page\u0026rdquo; and this confused me a lot. My routing unit tests failed because the query string was still concatenated and present in the value of the route data item, which I should have ignored. I hope this helps you better understand how query strings affect Routing and Model Binding, and helps you avoid what I went through. Watch out for routing unit tests, and good luck.\n","permalink":"https://emadashi.com/2012/01/querystring-in-routing-and-model-binding-in-asp-net-mvc/","summary":"\u003cp\u003eIn a nutshell, a query string will not be part of the RouteData dictionary in the routing process, yet it will affect the route matching. On the other hand, when Model Binding takes place, query string will be used to bind to the parameters of the action method, unless there is an item in route data with the same key.\u003c/p\u003e\n\u003cp\u003eNow the details. Let us consider this ASP.NET MVC application. We have an action method:\u003c/p\u003e","title":"QueryString in Routing and Model Binding in ASP.NET MVC"},{"content":"During the last quarter of 2011 we have hosted two amazing Jordanian Microsoft guests, Yousef Al Khalidi (Distinguished Engineer), and Ayman Dahleh (Development Manager for the Global Experience Platform group), who happened to be having their vacation here, they generously accepted our invitation to deliver sessions here in Jordan despite their busy times.\nThe community recorded these two inspiring interviews with our guests through which I can see how close achievements can be.\nA big thank-you to Mr. Yousef and Mr. Ayman for their availability, and thanks to our DPE at the time Mohammad Arrabi for giving us this opportunity to meet such great people, and thanks to our community member Mosab for making these videos.\n","permalink":"https://emadashi.com/2011/12/interviews-with-jordanian-microsoft-guests/","summary":"\u003cp\u003eDuring the last quarter of 2011 we have hosted two amazing Jordanian Microsoft guests, \u003ca href=\"http://www.microsoft.com/presspass/exec/de/Khalidi/default.mspx\"\u003eYousef Al Khalidi (Distinguished Engineer)\u003c/a\u003e, and Ayman Dahleh (Development Manager for the Global Experience Platform group), who happened to be having their vacation here, they generously accepted our invitation to deliver sessions here in Jordan despite their busy times.\u003c/p\u003e\n\u003cp\u003eThe community recorded these two inspiring interviews with our guests through which I can see how close achievements can be.\u003c/p\u003e","title":"Interviews with Jordanian Microsoft Guests"},{"content":"After I have moved to WinHost, I was surprised they don’t support multiple domains under one site out of the box; you have to rely on IIS URL Rewrite magic to achieve that.\nSo as expected, I looked for a solution in their KB and the internet (you don’t reinvent the wheel, remember?) and found couple of posts here, here, here, and here that helped a lot in achieving this.\nSo I managed to have www.emadashi.com and www.dotnetarabi.com working fine together residing in the folders “emadashi-blog” and “dotnetarabi-root” respectively under the root; they both have same IP address, but upon request a redirection is made to the proper application folder.\nUntil one day my very good friend Omar Qadan generously shared a link to an episode he found interesting; and the link was as the following:\n“www.dotnetarabi.com/dotnetarabi-root/episode.aspx?..etc”\nOps! that’s not right isn’t it! The URL should not include the folder name “dotnetarabi-root”! So I read more about Regular Expressions, read the above mentioned article more thoroughly, and came to the conclusion that for each domain we have we are going to write two rules:\nCorrect and Redirect undesired URL’s:\nIf IIS receives a request that contains the folder name (e.g “www.dotnetarabi.com/dotnetarabi-root/episode.aspx”), then: Omit the folder name from the URL, in our case the URL becomes “www.dotnetarabi.com/episode.aspx” Redirect the request again to IIS using the new URL, by sending 301 status prompting the browser to initiate a new request with the new URL The step above can be achieved by the following:\nFigure 1:\n\u0026lt;rule name=\u0026#34;UnWantedDirectAccessToSubFolder-DotNetArabi-root\u0026#34; patternSyntax=\u0026#34;ECMAScript\u0026#34; stopProcessing=\u0026#34;true\u0026#34;\u0026gt; \u0026lt;match url=\u0026#34;.*\u0026#34; /\u0026gt; \u0026lt;action type=\u0026#34;Redirect\u0026#34; url=\u0026#34;{C:1}\u0026#34; appendQueryString=\u0026#34;true\u0026#34; logRewrittenUrl=\u0026#34;false\u0026#34; /\u0026gt; \u0026lt;conditions\u0026gt; \u0026lt;add input=\u0026#34;{HTTP_HOST}\u0026#34; pattern=\u0026#34;^(www.)?dotnetarabi.com\u0026#34; /\u0026gt; \u0026lt;add input=\u0026#34;{PATH_INFO}\u0026#34; pattern=\u0026#34;^[/\\\\]dotnetarabi_root[/\\\\](.*)\u0026#34; /\u0026gt; \u0026lt;/conditions\u0026gt; \u0026lt;/rule\u0026gt; Then we do the second rule:\nGuide and Redirect desired URL’s to the right folder:\nIf IIS receives a request by the URL format we desire, which doesn’t contain the folder name (e.g. “www.dotnetarabi.com/episode.aspx”) then: Insert the folder name to the URL to be come “www.dotnetarabi.com/dotnetarabi-root/episode.aspx” in our case Rewrite the URL again within IIS using the new URL Which can be achieved by the following:\nFigure 2:\n\u0026lt;rule name=\u0026#34;DirectToDotNetArabiRoot\u0026#34; patternSyntax=\u0026#34;ECMAScript\u0026#34; stopProcessing=\u0026#34;true\u0026#34;\u0026gt; \u0026lt;match url=\u0026#34;.*\u0026#34; /\u0026gt; \u0026lt;action type=\u0026#34;Rewrite\u0026#34; url=\u0026#34;dotnetarabi_root/{R:0}\u0026#34; appendQueryString=\u0026#34;true\u0026#34; logRewrittenUrl=\u0026#34;false\u0026#34; /\u0026gt; \u0026lt;conditions\u0026gt; \u0026lt;add input=\u0026#34;{HTTP_HOST}\u0026#34; pattern=\u0026#34;^(www.)?dotnetarabi.com\u0026#34; /\u0026gt; \u0026lt;add input=\u0026#34;{PATH_INFO}\u0026#34; pattern=\u0026#34;^[/\\\\]emadalashi_blog[/\\\\]\u0026#34; negate=\u0026#34;true\u0026#34; /\u0026gt; \u0026lt;add input=\u0026#34;{PATH_INFO}\u0026#34; pattern=\u0026#34;^[/\\\\]dotnetarabi_root[/\\\\]\u0026#34; negate=\u0026#34;true\u0026#34; /\u0026gt; \u0026lt;/conditions\u0026gt; \u0026lt;/rule\u0026gt; The best way to describe what happens is through this diagram I put together (the start block is the “Browser”):\nAnd that was it, now notice the following:\nThe rules should maintain the mentioned order Rule 1 uses action type “Redirect”, and Rule 2 uses action type “Rewrite” We configure the rules to stop processing any rule after it is executed Your key to successful and easy manipulation of the URL is to understand the back-references in URL Rewrite. Notice the {C:1} and {R:0} usage above. Notice as well the brackets () in the URLs; they are used to capture back-references. Check the Using back-references in rewrite rules section in the above mentioned article. To test your rules use Fiddler, IE Developers Tools (Network tab), or Firebug (Net tab), and the great tool IIS provides to test rules which can be accessed by: open IIS –\u0026gt; select site-\u0026gt; URL Rewrite –\u0026gt; Double click rule –\u0026gt; double click condition –\u0026gt; Test pattern:\nI hope you found this useful.\nLet me do thanks here to www.gliffy.com as well for providing such great service for drawing diagrams online\n","permalink":"https://emadashi.com/2011/12/hide-subfolder-in-multiple-domains-under-one-site/","summary":"\u003cp\u003eAfter I have moved to \u003ca href=\"http://www.winhost.com/\"\u003eWinHost\u003c/a\u003e, I was surprised they don’t support multiple domains under one site out of the box; you have to rely on IIS URL Rewrite magic to achieve that.\u003c/p\u003e\n\u003cp\u003eSo as expected, I looked for a solution in their KB and the internet (you don’t reinvent the wheel, remember?) and found couple of posts \u003ca href=\"http://learn.iis.net/page.aspx/465/url-rewrite-module-configuration-reference/\"\u003ehere\u003c/a\u003e, \u003ca href=\"http://learn.iis.net/page.aspx/500/testing-rewrite-rule-patterns/\"\u003ehere\u003c/a\u003e, \u003ca href=\"http://weblogs.asp.net/owscott/archive/2010/01/26/iis-url-rewrite-hosting-multiple-domains-under-one-site.aspx\"\u003ehere\u003c/a\u003e, and \u003ca href=\"http://forum.winhost.com/showthread.php?t=4545\u0026amp;highlight=url\u0026#43;rewrite\"\u003ehere\u003c/a\u003e that helped a lot in achieving this.\u003cbr\u003e\nSo I managed to have \u003ca href=\"http://www.emadashi.com\"\u003ewww.emadashi.com\u003c/a\u003e and \u003ca href=\"http://www.dotnetarabi.com\"\u003ewww.dotnetarabi.com\u003c/a\u003e working fine together residing in the folders “emadashi-blog” and “dotnetarabi-root” respectively under the root; they both have same IP address, but upon request a redirection is made to the proper application folder.\u003c/p\u003e","title":"Hide Subfolder in Multiple Domains Under One Site"},{"content":"Couple of days ago I tried a key I acquired from Microsoft MSDN subscription to activate an Office installation, the activation didn’t work for some reason, so I filed a ticket, and I thought to myself “Oh great! now I will have to wait for ages until such large corporate like Microsoft would answer my ticket!”\nAnd less than 48 hours, I don’t receive an email, but my phone rings! The guy on the phone answers my inquiry and makes sure I am answered.\nConsidering how large this corporate is and the number of its clients, this is really amazing!\nSo if you are a startup, or a growing business, please keep this in mind; don’t give excuses to yourself for a low quality of service due to your growing business.\nGood job on this Microsoft.\n","permalink":"https://emadashi.com/2011/12/microsofts-support/","summary":"\u003cp\u003e\u003ca href=\"http://www.emadashi.com/wp-content/uploads/Microsoft_DD7D/microsoft-logo.jpg\"\u003e\u003cimg loading=\"lazy\" decoding=\"async\" style=\"background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: right; border-top: 0px; border-right: 0px; padding-top: 0px\" title=\"microsoft-logo\" border=\"0\" alt=\"microsoft-logo\" align=\"right\" src=\"/wp-content/uploads/Microsoft_DD7D/microsoft-logo_thumb.jpg\" width=\"260\" height=\"212\" /\u003e\u003c/a\u003eCouple of days ago I tried a key I acquired from Microsoft MSDN subscription to activate an Office installation, the activation didn’t work for some reason, so I filed a ticket, and I thought to myself “Oh great! now I will have to wait for ages until such large corporate like Microsoft would answer my ticket!”\u003c/p\u003e","title":"Microsoft’s Support"},{"content":"It was a very interesting event “AmmanTT: Developer Edition” which took place last Tuesday; the team did a very good job putting it together, it is really great seeing this great effort put into such fruitful events; moving the community steps forward, so thank you AmmanTT team, you rock.\nHereby I post the slides I presented in my talk:\nSoftware Life Cycle, Humans \u0026 Code View more presentations from Emad Alashi. ","permalink":"https://emadashi.com/2011/12/ammantt-developer-edition-presentation-and-slides/","summary":"\u003cp\u003eIt was a very interesting event “AmmanTT: Developer Edition” which took place last Tuesday; the team did a very good job putting it together, it is really great seeing this great effort put into such fruitful events; moving the community steps forward, so thank you AmmanTT team, you rock.\u003c/p\u003e\n\u003cp\u003eHereby I post the slides I presented in my talk:\u003c/p\u003e\n\u003cdiv style=\"width: 425px\" id=\"__ss_10531430\"\u003e\n  \u003cstrong style=\"margin: 12px 0px 4px; display: block\"\u003e\u003ca title=\"Software Life Cycle, Humans \u0026 Code\" href=\"http://www.slideshare.net/splashup/software-life-cycle-humans-code\"\u003eSoftware Life Cycle, Humans \u0026 Code\u003c/a\u003e\u003c/strong\u003e \u003c/p\u003e","title":"“AmmanTT: Developer Edition” presentation and slides"},{"content":"I will be speaking at “AmmanTT: Developer Edition” next Tuesday 6th of December 2011. Never heard about AmmanTT? quoting from their About page:\nComing to you on the first Tuesday of every month is a 2-hour event that brings industry experts, local technologists/engineers, entrepreneurs, idea-generators and just about any enthusiast together in a casual setting to meet and learn from each other\nI will be talking about the real-life side of the software development life cycle, and about the overlapping between Process and Humans in the cycle. So mark your calendars, I will be very happy to meet you there.\n","permalink":"https://emadashi.com/2011/12/speaking-at-ammantt-developer-edition/","summary":"\u003cp\u003e\u003ca href=\"http://www.ammantt.com\"\u003e\u003cimg loading=\"lazy\" decoding=\"async\" class=\"alignright size-full wp-image-391\" title=\"AmmanTT\" src=\"/wp-content/uploads/2011/12/logo6.png\" alt=\"AmmanTT\" width=\"140\" height=\"80\" /\u003e\u003c/a\u003eI will be speaking at “\u003ca href=\"https://www.facebook.com/#!/events/260707307313375/\"\u003eAmmanTT: Developer Edition\u003c/a\u003e” next Tuesday 6th of December 2011. Never heard about AmmanTT? quoting from their \u003ca href=\"http://ammantt.com/about-ammantt/\"\u003eAbout\u003c/a\u003e page:\u003c/p\u003e\n\u003cblockquote\u003e\n\u003cp\u003e\u003cem\u003eComing to you on the first Tuesday of every month is a 2-hour event that brings industry experts, local technologists/engineers, entrepreneurs, idea-generators and just about any enthusiast together in a casual setting to meet and learn from each other\u003c/em\u003e\u003c/p\u003e\u003c/blockquote\u003e\n\u003cp\u003eI will be talking about the real-life side of the software development life cycle, and about the overlapping between Process and Humans in the cycle. So mark your calendars, I will be very happy to meet you there.\u003c/p\u003e","title":"Speaking at AmmanTT: Developer Edition"},{"content":"And it’s over, the Microsoft Open Door event is behind us now, and so was my presentation about HTML5 and IE; all praise to god, the feedback was great and I am humbled by the nice compliments.\nIf you were among the audience and you have any comment, question, or critique, you are most welcome to contact me anytime.\nBelow is the presentation slides as I promised:\nHTML5 \u0026 IE View more presentations from Emad Alashi ","permalink":"https://emadashi.com/2011/11/html5-and-ie-presentation-on-microsoft-open-door/","summary":"\u003cp\u003eAnd it’s over, the Microsoft Open Door event is behind us now, and so was my presentation about HTML5 and IE; all praise to god, the feedback was great and I am humbled by the nice compliments.\u003cbr\u003e\nIf you were among the audience and you have any comment, question, or critique, you are most welcome to contact me anytime.\u003c/p\u003e\n\u003cp\u003eBelow is the presentation slides as I promised:\u003c/p\u003e\n\u003cdiv style=\"width: 425px\" id=\"__ss_10025206\"\u003e\n  \u003cstrong style=\"margin: 12px 0px 4px; display: block\"\u003e\u003ca title=\"HTML5 \u0026 IE\" href=\"http://www.slideshare.net/splashup/html5-ie\" target=\"_blank\"\u003eHTML5 \u0026 IE\u003c/a\u003e\u003c/strong\u003e \u003c/p\u003e","title":"HTML5 and IE presentation on Microsoft Open Door"},{"content":"I will be speaking at this year’s Microsoft event Open Door; the session will be about HTML5 \u0026amp; IE, including highlights on the main new specifications for HTML5, and how Microsoft is approaching it through IE and some of the dev tools.\nIt will be on Day 2, Track 3, at 3:00 PM.\nCheck the event details and agenda here, catch you there hopefully.\n","permalink":"https://emadashi.com/2011/10/speaking-at-microsoft-open-door/","summary":"\u003cp\u003eI will be speaking at this year’s Microsoft event \u003ca href=\"http://www.microsoft.com/middleeast/jordan/opendoor/\"\u003eOpen Door\u003c/a\u003e; the session will be about HTML5 \u0026amp; IE, including highlights on the main new specifications for HTML5, and how Microsoft is approaching it through IE and some of the dev tools.\u003cbr\u003e\nIt will be on Day 2, Track 3, at 3:00 PM.\u003c/p\u003e\n\u003cp\u003eCheck the event details and agenda \u003ca href=\"http://www.microsoft.com/middleeast/jordan/opendoor/agenda.aspx\"\u003ehere\u003c/a\u003e, catch you there hopefully.\u003c/p\u003e","title":"Speaking at Microsoft Open Door"},{"content":"This is a shout-out to MP3 Skype Recorder, the best Skype recorder I have ever used to record Skype calls.\nIt’s been two years since DotNetArabi’s first episode, most of the episodes were recorded over Skype using MP3 Skype Recorder. It wasn’t the only tool I tried, I have downloaded several, but none competed with its simplicity and robustness, never hanged, never failed, and it’s totally free!\nIf you want the best Skype audio recorder, check MP3 Skype Recorder\n","permalink":"https://emadashi.com/2011/10/best-skype-audio-chat-recorder/","summary":"\u003cp\u003eThis is a shout-out to \u003ca href=\"http://voipcallrecording.com/\"\u003eMP3 Skype Recorder\u003c/a\u003e, the best Skype recorder I have ever used to record Skype calls.\u003cbr\u003e\nIt’s been two years since \u003ca href=\"http://www.dotnetarabi.com/\"\u003eDotNetArabi’s\u003c/a\u003e first episode, most of the episodes were recorded over Skype using MP3 Skype Recorder. It wasn’t the only tool I tried, I have downloaded several, but none competed with its simplicity and robustness, never hanged, never failed, and it’s totally free!\u003c/p\u003e\n\u003cp\u003e\u003ca href=\"http://voipcallrecording.com/\"\u003e\u003cimg loading=\"lazy\" decoding=\"async\" style=\"background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px\" title=\"10-15-2011CropperCapture[2]\" src=\"https://www.emadashi.com/misc/images/1cec17406ad1_1074D/10-15-2011CropperCapture2.jpg\" border=\"0\" alt=\"10-15-2011CropperCapture[2]\" width=\"88\" height=\"84\" /\u003e\u003c/a\u003e\u003c/p\u003e","title":"Best Skype Audio Chat Recorder"},{"content":"Couple of days ago I received the wonderful email from Microsoft telling me that I was awarded the MVP; it really feels nice when you achieve results. But the best part of all this is my friends’ reactions, the congrats, and the big smiles on the faces (not mentioning a generous gift from my colleagues ), to all these true friends I say big thank you!\n","permalink":"https://emadashi.com/2011/10/my-mvp-award-dedication/","summary":"\u003cp\u003eCouple of days ago I received the wonderful email from Microsoft telling me that I was awarded the MVP; it really feels nice when you achieve results. But the best part of all this is my friends’ reactions, the congrats, and the big smiles on the faces (not mentioning a generous gift from my colleagues\u003cimg decoding=\"async\" style=\"border-bottom-style: none; border-left-style: none; border-top-style: none; border-right-style: none\" class=\"wlEmoticon wlEmoticon-winkingsmile\" alt=\"Winking smile\" src=\"https://www.emadashi.com/misc/images/43c7709abec2_905/wlEmoticon-winkingsmile.png\" /\u003e ), to all these true friends I say big thank you!\u003c/p\u003e","title":"My MVP Award Dedication"},{"content":"To be frank I hesitated a bit to review a “a Martin Fowlers signature book”, but I have to share this review with others; to set expectations.\nThe book “Continuous Integration” is ok, but it’s too general, that’s it!\nI have read several articles about Continuous Integration and posts here and there until I thought to myself “that’s it, it’s time to get the book, it’s time to delve deep into this”, to my surprise the content of the book was too general and it didn’t add much to the articles I read.\nThe book itself is nice, but if you have been reading about CI in the past and want to delve deeper, this is NOT the book you want to get.\n","permalink":"https://emadashi.com/2011/05/continuous-integration-book-review/","summary":"\u003cp\u003e\u003ca href=\"http://www.amazon.com/Continuous-Integration-Improving-Software-Reducing/dp/0321336380/ref=sr_1_1?s=books\u0026amp;ie=UTF8\u0026amp;qid=1305982047\u0026amp;sr=1-1\"\u003e\u003cimg loading=\"lazy\" decoding=\"async\" style=\"background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: right; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px\" title=\"ContinuousIntegration-cover\" border=\"0\" alt=\"ContinuousIntegration-cover\" align=\"right\" src=\"https://www.emadashi.com/misc/images/Continuous-Integration-Book-Review_CB15/ContinuousIntegration-cover.jpg\" width=\"185\" height=\"244\" /\u003e\u003c/a\u003eTo be frank I hesitated a bit to review a “a Martin Fowlers signature book”, but I have to share this review with others; to set expectations.\u003c/p\u003e\n\u003cp\u003e\u003ca href=\"http://www.amazon.com/Continuous-Integration-Improving-Software-Reducing/dp/0321336380/ref=sr_1_1?s=books\u0026amp;ie=UTF8\u0026amp;qid=1305982047\u0026amp;sr=1-1\"\u003eThe book “Continuous Integration”\u003c/a\u003e is ok, but it’s \u003cu\u003etoo general\u003c/u\u003e, that’s it!\u003cbr\u003e\nI have read several articles about \u003ca href=\"http://en.wikipedia.org/wiki/Continuous_integration\"\u003eContinuous Integration\u003c/a\u003e and posts here and there until I thought to myself “that’s it, it’s time to get the book, it’s time to delve deep into this”, to my surprise the content of the book was too general and it didn’t add much to the articles I read.\u003c/p\u003e","title":"Continuous Integration Book Review"},{"content":"Last Saturday 14th of May 2011 we had the first web camp in Jordan among Jordev’s activities, and it was great!\ncheck my presentation slides at the end of this post.\nThe event was like the following:\n8:30 AM – 9:00 AM: Registration 9:00 AM – 1:00 PM: Four 50 minutes sessions with 10 minutes between each for breaks, there was a few attendees at the beginning so we delayed the first session for couple of minutes (yes we have a morning problem here). Sessions were “Entity Framework 4.1”, “ASP.NET MVC One Step Deeper”, “Dynamic Data”, and “jQuery” 1:00 PM – 2:15 PM: lunch break, where people went to the near market and had their lunch there. 2:15 PM – 4:30 PM: free coding session. Things went great:\nEnough people attended. The attendees were about 25 people spread all over a hall that takes at least 100, this gave us a great freedom in moving around and hocking cables freely on available slots. The attendees were great. It’s awesome that the attendees were really serious about the event; everyone brought his/her laptop charged and ready, every one was kind enough to pay the right attention, and everyone stayed to the last minute; it’s this passion and dedication that makes a successful event a successful event. Very good speakers. We were lucky enough to host one of the smartest and most active community members in Jordan: Omar Qadan, Mahmoud Manasrah, and Omar Muwahed did a great job and delivered such a rich value, I was humbled to be among such intelligent speakers and share the stage with them. Topics were diverse. It’s true all web, but we covered four important parts that summed the basics of a web app: Entity Framework, ASP.NET MVC, Dynamic Data, and jQuery. There was no lunch arrangement hassle. Interestingly enough, we decided to skip the arrangement for lunch; we still had a lunch break and we provided fast coffee, but we revolted on the pattern of supplying sponsored food and snacks on the lunch break, this gave us the opportunity to concentrate more on delivering technical value, and less managerial things. Of course the near market made our decision a lot easier, in addition to our good luck of having such sufficient number of attendees. Two and half hours of Free coding. Actually this was pretty good; the free nature of the session allowed the attendees to contribute, and to ask their questions freely.\nWe first gave the attendees the opportunity to try things on their own, then we suggested to have walkthroughs; started playing with some of the latest technologies NuGet and Glimpse, then a walkthrough on ASP.NET MVC, then finally a brief general talk about OData. Though I see a big space for improvement here; the down side is that there was a dominant stream because the presenter used the main desk and the presentation screen to talk to the majority in the walkthroughs, which was a distraction to the individuals who wanted to try things on their own, anyway I didn’t hear any complaints.\nWe had an option to distribute people among groups depending on the technology they want to learn, but it appeared that it was little bit hard to organize, and the attendees in majority agreed to the way we concluded. The DVD accumulated for the event. We accumulated a DVD that contains Visual Studio 2010 Express, SQL 2008 Express, VS2010 SP1, NerdDinner sample, and MVCMusicStore sample. This helped others to boot up fast with the event, and a nice thing for the attendees to go home with. Things went wrong:\nMarketing the event. We thought that we should limit the number of the attendees to 80 so we don’t end up in crowded auditorium, so we did, and 80 people registered on EventBrite in less than 48 hours of declaring the event on Facebook and Twitter. To our sad happy surprise only 25 people showed up! I know that not all event registrars attend the events they register for online, but the percent is strikingly high! 75% not attending?! what was wrong?\nI think we didn\u0026rsquo;t do enough reminders, apparently people are lazy about keeping their calendars SQL Express installation file was 64 bit. 32 bit OS is still the most common OS here, so we missed that up. Things we did for preparations:\nDistributed tasks among us (four people) so everyone had a clear task, this way we made sure we don\u0026rsquo;t miss anything due to ambiguity in responsibilities One of us made sure the hall was booked (more tedious than you think!) Created an event on EventBrite and shared the link over a mailing list, Facebook, and Twitter Brought enough 3-in-1 packs of Nescafe, one electronic kettle for hot water, and many small bottles of water Burned out DVD\u0026rsquo;s with free content (check above) Brought 3 multi-slot plugs to support the many laptops with electricity Rehearsed enough for the presentations :) That was about it, I hope this reading benefits you and good luck with YOUR web camps.\nMy presentation slides embedded:\nASP.NET MVC One Step Deeper View more presentations from Emad Alashi ","permalink":"https://emadashi.com/2011/05/reflections-on-jordev-web-camp/","summary":"\u003cp\u003e\u003ca href=\"http://www.emadashi.com/misc/images/634a70b9a492_148FE/webcamps.png\"\u003e\u003cimg loading=\"lazy\" decoding=\"async\" style=\"background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: right; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px\" title=\"webcamps\" border=\"0\" alt=\"webcamps\" align=\"right\" src=\"https://www.emadashi.com/misc/images/634a70b9a492_148FE/webcamps_thumb.png\" width=\"244\" height=\"194\" /\u003e\u003c/a\u003eLast Saturday 14th of May 2011 we had the first \u003ca href=\"http://webcamps.ms\"\u003eweb camp\u003c/a\u003e in Jordan among Jordev’s activities, and it was great!\u003cbr\u003e\n\u003cem\u003echeck my presentation slides at the end of this post.\u003c/em\u003e\u003c/p\u003e\n\u003cp\u003eThe event was like the following:\u003c/p\u003e\n\u003col\u003e\n\u003cli\u003e\u003cstrong\u003e8:30 AM – 9:00 AM\u003c/strong\u003e: Registration\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003e9:00 AM – 1:00 PM\u003c/strong\u003e: Four 50 minutes sessions with 10 minutes between each for breaks, there was a few attendees at the beginning so we delayed the first session for couple of minutes (yes we have a morning problem here). Sessions were “\u003ca href=\"http://www.slideshare.net/omarq/entity-framework41codefirst\"\u003eEntity Framework 4.1\u003c/a\u003e”, “\u003ca href=\"http://www.slideshare.net/splashup/aspnet-mvc-one-step-deeper\"\u003eASP.NET MVC One Step Deeper\u003c/a\u003e”, “Dynamic Data”, and “\u003ca href=\"http://www.slideshare.net/i.omar/jquery-7978005\"\u003ejQuery\u003c/a\u003e”\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003e1:00 PM – 2:15 PM\u003c/strong\u003e: lunch break, where people went to the near market and had their lunch there.\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003e2:15 PM – 4:30 PM\u003c/strong\u003e: free coding session.\u003c/li\u003e\n\u003c/ol\u003e\n\u003cp\u003e\u003cstrong\u003eThings went great\u003c/strong\u003e:\u003c/p\u003e","title":"Reflections on Jordev Web Camp"},{"content":"For too long, all Jordev’s activities have been in the form of sessions with fast code demos, and for the first time we are going to break this rule and do our first web camp in which attendees will have the chance to have hands-on experience with some of Jordan’s active experts. It will be on the 15th of May 2011.\nThere are two things in web camps that make them more interesting: REAL CODING and COLLABORATION; coding is a practice science, best way to learn it is by practice, and this practice will be much more fruitful and enjoyable if done with a bunch of enthusiasts who share the same passion with you. Speakers will have their share, but the biggest share will go to the hidden experts who have been hiding under excessive working hours and who avoid boring talkative sessions. This gathering will be a chance for us to dig these gems out and have the most geeky fun and benefit we seek in such communities.\nThe schedule will be as follows:\nSession Time Duration Speaker Registration 08:30 – 09:00 00:30 — Entity Framework 09:00 – 09:50 00:50 Omar Qadan MVC one step deeper 10:00 – 10:50 00:50 Emad Alashi Data Dynamics 11:00 – 11:50 00:50 Mahmoud Manasrah jQuery 12:00 – 12:50 00:50 Omar Muwahed Break 1:00 – 2:00 1:00 — Hands on Labs 2:00 – 4:30 2:30 Speakers and attendees For more details, you can follow it on EventBrite here. See you there.\n","permalink":"https://emadashi.com/2011/05/first-jordev-web-camp/","summary":"\u003cp\u003eFor too long, all Jordev’s activities have been in the form of sessions with fast code demos, and for the first time we are going to break this rule and do our \u003ca href=\"http://ammanwebcamp.eventbrite.com/\"\u003efirst web camp\u003c/a\u003e in which attendees will have the chance to have hands-on experience with some of Jordan’s active experts. It will be on the 15th of May 2011.\u003c/p\u003e\n\u003cp\u003e\u003ca href=\"http://webcamps.ms\"\u003e\u003cimg alt=\"First Jordev Web Camp\" loading=\"lazy\" src=\"https://www.emadashi.com/misc/images/First-Jordev-Web-Camp_B88A/1637932099-3_thumb.png\"\u003e\u003c/a\u003e\u003c/p\u003e\n\u003cp\u003eThere are two things in web camps that make them more interesting: REAL CODING and COLLABORATION; coding is a practice science, best way to learn it is by practice, and this practice will be much more fruitful and enjoyable if done with a bunch of enthusiasts who share the same passion with you. Speakers will have their share, but the biggest share will go to the hidden experts who have been hiding under excessive working hours and who avoid boring talkative sessions. This gathering will be a chance for us to dig these gems out and have the most geeky fun and benefit we seek in such communities.\u003c/p\u003e","title":"First Jordev Web Camp"},{"content":"Today I was looking for a fast way to find the index of a nth occurrence of a string in a string, so I found this very simple and intuitive site on which you can find and share .net extension methods, the website is http://www.extensionmethod.net Dah!\nI couldn’t find what I looked for, so I shared my solution here; the website made it crazy easy to share this! Something I definitely would add to my log on how to create wonderful websites, simple and effective.\n","permalink":"https://emadashi.com/2011/04/brilliantly-simple-code-sharing/","summary":"\u003cp\u003eToday I was looking for a fast way to find the index of a nth occurrence of a string in a string, so I found this very simple and intuitive site on which you can find and share .net extension methods, the website is \u003ca href=\"http://www.extensionmethod.net\" title=\"http://www.extensionmethod.net\"\u003ehttp://www.extensionmethod.net\u003c/a\u003e Dah!\u003cimg decoding=\"async\" style=\"border-bottom-style: none; border-left-style: none; border-top-style: none; border-right-style: none\" class=\"wlEmoticon wlEmoticon-smile\" alt=\"Smile\" src=\"https://www.emadashi.com/misc/images/d0d03c8f2bd1_145AF/wlEmoticon-smile.png\" /\u003e\u003c/p\u003e\n\u003cp\u003eI couldn’t find what I looked for, so I shared my solution \u003ca href=\"http://www.extensionmethod.net/Details.aspx?ID=457\"\u003ehere\u003c/a\u003e; the website made it crazy easy to share this! Something I definitely would add to my log on how to create wonderful websites, simple and effective.\u003c/p\u003e","title":"Brilliantly Simple Code Sharing"},{"content":"The other day I needed an ASP.NET MVC grid control, and I have always heard about Telerik’s ASP.NET MVC Extensions and the great tools they provide, so I decided to give them a try.\nSo I followed the installation guide step by step, and prepared my code to use the extensions; I added a reference to the DLL, added the scripts, etc… and I thought I was ready to test-drive it.\nI opened Telerik’s sample website which showed the control and below it the code sample that made it work, innocently enough I did what any other developer would do to try out the sample code: copy and paste it in your page and then build. To my surprise there was an error in the View; it didn’t recognize an Extension method called “Configurator”!\nIt was so strange, why wouldn’t it work? I made sure that I added the correct reference dll, that I added the namespaces in the web.config as advised by the guide, and that I used the “using” at the top of my page, but yet it didn’t work.\nOk now that is really strange, I downloaded Reflector ILSpy and disassembled Teleriks dll to make sure that this method exists, and it wasn’t there! where does this Configurator method come from?!\nI opened the sample project to make sure of their code, and guess what…the Configurator method was a method that only exists in their sample project; it wasn’t part of the DLL! I wasted considerable time trying to figure this out, and my conclusion was: never use auxiliary code when you are presenting a sample for another code unless you make it clear.\n","permalink":"https://emadashi.com/2011/04/code-sample-should-be-clean/","summary":"\u003cp\u003e\u003ca href=\"http://www.emadashi.com/misc/images/693e7de0646a_15FD/big_Telerik01.gif\"\u003e\u003cimg loading=\"lazy\" decoding=\"async\" style=\"background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: right; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px\" title=\"big_Telerik01\" border=\"0\" alt=\"big_Telerik01\" align=\"right\" src=\"https://www.emadashi.com/misc/images/693e7de0646a_15FD/big_Telerik01_thumb.gif\" width=\"229\" height=\"94\" /\u003e\u003c/a\u003eThe other day I needed an ASP.NET MVC grid control, and I have always heard about \u003ca href=\"http://www.telerik.com/products/aspnet-mvc.aspx\"\u003eTelerik’s ASP.NET MVC Extensions\u003c/a\u003e and the great tools they provide, so I decided to give them a try.\u003c/p\u003e\n\u003cp\u003eSo I followed the installation guide step by step, and prepared my code to use the extensions; I added a reference to the DLL, added the scripts, etc… and I thought I was ready to test-drive it.\u003cbr\u003e\nI opened Telerik’s sample website which showed the control and below it the code sample that made it work, innocently enough I did what any other developer would do to try out the sample code: copy and paste it in your page and then build. To my surprise there was an error in the View; it didn’t recognize an Extension method called “Configurator”!\u003c/p\u003e","title":"Code Sample Should Be Clean"},{"content":"It was great to get back to presentations after this while; ASP.NET MVC was the topic for the latest session I delivered through Jordev. The audience was great, I hope they enjoyed it as much as I did preparing for it.\nyou can find the slides on Slideshare, embedded here as well:\nIntroduction to ASP.NET MVC View more presentations from Emad Alashi. I will upload the photos of the session and possibly a recorded video to youtube in the nearest chance enshallah.\n","permalink":"https://emadashi.com/2010/11/introduction-to-asp-net-mvc-session-at-jordev/","summary":"\u003cp\u003eIt was great to get back to presentations after this while; ASP.NET MVC was the topic for the latest session I delivered through Jordev. The audience was great, I hope they enjoyed it as much as I did preparing for it.\u003c/p\u003e\n\u003cp\u003eyou can find the slides on Slideshare, embedded here as well:\u003c/p\u003e\n\u003cdiv style=\"width: 425px\" id=\"__ss_5926505\"\u003e\n  \u003cstrong style=\"margin: 12px 0px 4px; display: block\"\u003e\u003ca title=\"Introduction to ASP.NET MVC\" href=\"http://www.slideshare.net/splashup/introduction-to-aspnet-mvc-5926505\"\u003eIntroduction to ASP.NET MVC\u003c/a\u003e\u003c/strong\u003e \u003c/p\u003e \n  \u003cdiv style=\"padding-bottom: 12px; padding-left: 0px; padding-right: 0px; padding-top: 5px\"\u003e\n    View more \u003ca href=\"http://www.slideshare.net/\"\u003epresentations\u003c/a\u003e from \u003ca href=\"http://www.slideshare.net/splashup\"\u003eEmad Alashi\u003c/a\u003e.\n  \u003c/div\u003e\u003c/p\u003e","title":"Introduction to ASP.NET MVC session at Jordev"},{"content":"Here is your chance (with little effort) to win a fully-paid trip to Tech-Ed Middle East 2011. Simple tasks are required from your part and you will find yourself with the ultimate geeks in Dubai next year.\nFor the details check the competitions website on http://compete.jordanruns.net/\n","permalink":"https://emadashi.com/2010/10/attend-tech-ed-middle-east-2011-for-free/","summary":"\u003cp\u003e\u003ca href=\"http://compete.jordanruns.net/\"\u003e\u003cimg loading=\"lazy\" decoding=\"async\" style=\"background-image: none; border-right-width: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; float: right; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px\" title=\"logo\" border=\"0\" alt=\"logo\" align=\"right\" src=\"https://www.emadashi.com/misc/images/Attend-Tech-Ed-Middle-East-2011-for-free_135E3/logo.png\" width=\"260\" height=\"95\" /\u003e\u003c/a\u003eHere is your chance (with little effort) to win a fully-paid trip to Tech-Ed Middle East 2011. Simple tasks are required from your part and you will find yourself with the ultimate geeks in Dubai next year.\u003c/p\u003e\n\u003cp\u003eFor the details check the competitions website on \u003ca href=\"http://compete.jordanruns.net/\" title=\"http://compete.jordanruns.net/\"\u003ehttp://compete.jordanruns.net/\u003c/a\u003e\u003c/p\u003e","title":"Attend Tech-Ed Middle East 2011 for free!"},{"content":"Update: Twitter \u0026ldquo;statuses/followers\u0026rdquo; API documentation had a small note at the bottom that says it returns only 100 followers if no paging is used. I have updated the script accordingly. Thanks to @RamyMahrous for notifying me in his comment below.\nFor a long time I thought that @DotNetArabi shouldn’t follow it’s own followers due to various reasons I had, but lately I discovered that I was wrong. So I have decided to follow them back no matter how many they are, but that would be a tedious thing to do manually. Here comes Powershell to the rescue.\nI wrote the following Powershell script in Powershell ISE (the Integrated Scripting Environment), which is already shipped with Win7, utilizing Twitter\u0026rsquo;s APIs, and it did the trick:\n$wc = New-Object System.Net.WebClient $wc.Credentials = New-Object System.Net.NetworkCredential \u0026#34;dotnetarabi\u0026#34;, \u0026#34;UseYourOwnPWbuddy!\u0026#34; $cursorCount = \u0026#34;-1\u0026#34; do { $rest = $wc.DownloadString(\u0026#34;http://api.twitter.com/statuses/followers.xml?cursor=\u0026#34; + $cursorCount) $xml = [xml]$rest foreach ($user in $xml.users_list.users.user) { $wc.UploadString(\u0026#34;http://api.twitter.com/1/friendships/create/\u0026#34; + $user.screen_name + \u0026#34;.xml\u0026#34;, \u0026#34;\u0026#34;) } $cursorCount = $xml.users_list.next_cursor } while ($xml.users_list.next_cursor -ne \u0026#34;0\u0026#34;) It\u0026rsquo;s simple and straightforward; I used the \u0026ldquo;UploadString\u0026rdquo; method of the WebClient class because it produces a \u0026ldquo;POST\u0026rdquo; HTTP request required by Twitter API rather than \u0026ldquo;GET\u0026rdquo;. Note that the response you get from the \u0026ldquo;Create\u0026rdquo; API will be either an XML representation of the followed-user entity, or a server error \u0026ldquo;Forbidden\u0026rdquo; for many reasons Twitter may have. This is how you will know if each \u0026ldquo;follow\u0026rdquo; procedure succeeded or not.\nThanks to Helge Klein I could highlight my Powershell script by his script here\n","permalink":"https://emadashi.com/2010/08/use-powershell-to-follow-your-followers-on-twitter/","summary":"\u003cp\u003e\u003cstrong\u003eUpdate\u003c/strong\u003e: Twitter \u0026ldquo;\u003ca href=\"http://apiwiki.twitter.com/Twitter-REST-API-Method%3A-statuses%C2%A0followers\"\u003estatuses/followers\u003c/a\u003e\u0026rdquo; API documentation had a small note at the bottom that says it returns only 100 followers if no paging is used. I have updated the script accordingly. Thanks to \u003ca href=\"http://twitter.com/RamyMahrous\"\u003e@RamyMahrous\u003c/a\u003e for notifying me in his comment below.\u003c/p\u003e\n\u003cp\u003eFor a long time I thought that \u003ca href=\"http://www.twitter.com/DotNetArabi\"\u003e@DotNetArabi\u003c/a\u003e shouldn’t follow it’s own followers due to various reasons I had, but lately I discovered that I was wrong. So I have decided to follow them back no matter how many they are, but that would be a tedious thing to do manually. Here comes \u003ca href=\"http://en.wikipedia.org/wiki/Powershell\"\u003ePowershell\u003c/a\u003e to the rescue.\u003c/p\u003e","title":"Use Powershell To Follow Your Followers On Twitter"},{"content":"In this post I will show you an example of how smartly built controls and API’s can make the developers programming life extremely enjoyable, hopefully this example will urge you in giving such a smart effort when you build your own control or API.\nLately I have been playing around with a very nice tree control based on jQuery called jsTree. One of the nice features is that it allows populating the tree through asynchronous calls with JSON data representation. In order to achieve that, you needed to provide the data by JSON special format suitable to the tree. This format, regrettably, is open to the JSON vulnerability Phil Haack talked about in his two posts here and here.\nSo to avoid this vulnerability I had to change this default data format of the tree, at least until the very end of the data flow just before the tree populates the data, only then I can change it back to the default format, like the following:\nThe format I need to send from server to avoid the vulnerability, but the tree wouldn’t understand:\n{ \u0026#34;d\u0026#34;: [ { \u0026#34;attributes\u0026#34;: { \u0026#34;id\u0026#34;: \u0026#34;2\u0026#34;, \u0026#34;balance\u0026#34;: \u0026#34;0.00000\u0026#34; }, \u0026#34;data\u0026#34;: \u0026#34;Child\u0026#34;, \u0026#34;state\u0026#34;: \u0026#34;closed\u0026#34; }, { \u0026#34;attributes\u0026#34;: { \u0026#34;id\u0026#34;: \u0026#34;3\u0026#34;, \u0026#34;balance\u0026#34;: \u0026#34;0.00000\u0026#34; }, \u0026#34;data\u0026#34;: \u0026#34;AnotherChild\u0026#34;, \u0026#34;state\u0026#34;: \u0026#34;closed\u0026#34; } ] } The format the tree accepts, to which I should change back before populating:\n[ { \u0026#34;attributes\u0026#34;: { \u0026#34;id\u0026#34;: \u0026#34;2\u0026#34;, \u0026#34;balance\u0026#34;: \u0026#34;0.00000\u0026#34; }, \u0026#34;data\u0026#34;: \u0026#34;Child\u0026#34;, \u0026#34;state\u0026#34;: \u0026#34;closed\u0026#34; }, { \u0026#34;attributes\u0026#34;: { \u0026#34;id\u0026#34;: \u0026#34;3\u0026#34;, \u0026#34;balance\u0026#34;: \u0026#34;0.00000\u0026#34; }, \u0026#34;data\u0026#34;: \u0026#34;AnotherChild\u0026#34;, \u0026#34;state\u0026#34;: \u0026#34;closed\u0026#34; } ] That would not have been possible if the tree control wasn’t smart enough to provide the developer with the “ondata” event (line 45) that happens exactly before the binding to the tree, in which you can manipulate the data; in my case I am eliciting the data out by returning the “content” of the wrapper object “d” rather than the whole thing.\n\u0026lt;script type=\u0026#34;text/javascript\u0026#34;\u0026gt; var initialData = \u0026lt;%= ViewData[\u0026#34;InitialList\u0026#34;].ToString() %\u0026gt; $(function () { $(\u0026#34;#MyTree\u0026#34;).tree({ data : { type : \u0026#34;json\u0026#34;, async : true, opts : { async : true, method : \u0026#34;GET\u0026#34;, url : \u0026#34;GetNodesOfParent\u0026#34; } }, ondata: function (data, tree_obj) { return data.d; },..... }); }); \u0026lt;/script\u0026gt; Such flexibility and clean structure in controls and API’s is one of the very important aspects a control-developer should keep in mind.\n","permalink":"https://emadashi.com/2010/06/happy-life-with-intuitive-api-in-smart-controls/","summary":"\u003cp\u003eIn this post I will show you an example of how smartly built controls and API’s can make the developers programming life extremely enjoyable, hopefully this example will urge you in giving such a smart effort when you build your own control or API.\u003c/p\u003e\n\u003cp\u003eLately I have been playing around with a very nice tree control based on jQuery called \u003ca href=\"http://www.jstree.com/\"\u003ejsTree\u003c/a\u003e. One of the nice features is that it allows populating the tree through asynchronous calls with JSON data representation. In order to achieve that, you needed to provide the data by JSON special format suitable to the tree. This format, regrettably, is open to the JSON vulnerability \u003ca href=\"http://haacked.com/\"\u003ePhil Haack\u003c/a\u003e talked about in his two posts \u003ca href=\"http://haacked.com/archive/2008/11/20/anatomy-of-a-subtle-json-vulnerability.aspx\"\u003ehere\u003c/a\u003e and \u003ca href=\"http://haacked.com/archive/2009/06/25/json-hijacking.aspx\"\u003ehere\u003c/a\u003e.\u003cbr\u003e\nSo to avoid this vulnerability I had to change this default data format of the tree, at least until the very end of the data flow just before the tree populates the data, only then I can change it back to the default format, like the following:\u003c/p\u003e","title":"Happy Life with Intuitive API in Smart Controls"},{"content":"Today we came across an interesting issue at work: we have two teams A and B who interchange API calls. Team A needed an API from team B to process a business that is owned by team B of course. The signature was like the following:\npublic OutputEntity MyMethod(List listOfIds);\nIt appeared afterward that this method was very slow, and the client was already very upset about the low performance, which consequently caused big pressure on the teams by the superiors to enhance the performance.\nAfter investigating the issue, it appeared that the list of ID\u0026rsquo;s sent as input consists of some ID\u0026rsquo;s that do not need to be processed, this criteria of “not need to be processed” is a business owned by team B, done by using properties of the entities these ID\u0026rsquo;s represent. So the solution to this issue was one of the following:\nMoving the business out of the API to the client application to do the filtering, since the calling method already has the entities themselves (not so good to move business out of scope!) Let the API do the filtering, but this will worsen the performance because the API will have to retrieve these entities from the database in order to use its\u0026rsquo; properties! So is that a dead end? actually that was stupid! the situation was stressful enough and pressured by our superiors to enhance the performance that we missed a very simple fact: pass the list of entities themselves!\nStressful situations make us stupid, so make as less stress as possible on your team, help them to be smarter.\n","permalink":"https://emadashi.com/2010/05/stressful-situations-make-you-stupid/","summary":"\u003cp\u003eToday we came across an interesting issue at work: we have two teams A and B who interchange API calls. Team A needed an API from team B to process a business that is owned by team B of course. The signature was like the following:\u003c/p\u003e\n\u003cp\u003epublic OutputEntity MyMethod(List listOfIds);\u003c/p\u003e\n\u003cp\u003eIt appeared afterward that this method was very slow, and the client was already very upset about the low performance, which consequently caused big pressure on the teams by the superiors to enhance the performance.\u003cbr\u003e\nAfter investigating the issue, it appeared that the list of ID\u0026rsquo;s sent as input consists of some ID\u0026rsquo;s that do not need to be processed, this criteria of “not need to be processed” is a business owned by team B, done by using properties of the entities these ID\u0026rsquo;s represent. So the  solution to this issue was one of the following:\u003c/p\u003e","title":"Stressful Situations Make You Stupid"},{"content":" Lately OData (Open Data protocol) is gaining a great momentum, everybody is talking about, and in fact it deserves all this fuss. OData is a protocol through which you can share data provided as ATOM or JSON formats by exposing URI’s to be invoked via HTTP, check the FAQ for fast information.\nOne of the interesting things is that the protocol provides various options through the URI to query all sort data; conditions, ordering, filtering, smart selection, …etc, in addition to very smart linking between exposed entities.\nSo hereby I provide the data of DotNetArabi through OData on the link http://odata.dotnetarabi.com/odata.svc for the sake of fun and for anyone who might find it useful. I used the Entity Framework for this purpose since it was the easiest, you can find a very helpful information here.\nTo start playing around check:\nhttp://odata.dotnetarabi.com/odata.svc/Guests\n\u0026lt;http://odata.dotnetarabi.com/odata.svc/Episodes?$filter=AudioFileLength gt 40\u0026gt;\nI hope you find it interesting.\n","permalink":"https://emadashi.com/2010/04/exposing-dotnetarabi-for-odata/","summary":"\u003cp\u003e\u003ca href=\"http://www.dotnetarabi.com\"\u003e\u003cimg loading=\"lazy\" decoding=\"async\" style=\"border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px\" title=\"www.DotNetArabi.com\" src=\"/wp-content/uploads/2010/04/logoCopy.jpg\" border=\"0\" alt=\"www.DotNetArabi.com\" width=\"92\" height=\"92\" /\u003e\u003c/a\u003e \u003ca href=\"http://www.odata.org\"\u003e\u003cimg loading=\"lazy\" decoding=\"async\" style=\"border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px\" title=\"www.odata.org\" src=\"/wp-content/uploads/2010/04/images.jpg\" border=\"0\" alt=\"www.odata.org\" width=\"60\" height=\"60\" /\u003e\u003c/a\u003e\u003c/p\u003e\n\u003cp\u003eLately \u003ca href=\"http://www.odata.org/developers/protocols/overview\"\u003eOData\u003c/a\u003e (Open Data protocol) is gaining a great momentum, everybody is talking about, and in fact it deserves all this fuss. OData is a protocol through which you can share data provided as ATOM or JSON formats by exposing URI’s to be invoked via HTTP, check the \u003ca href=\"http://www.odata.org/faq\"\u003eFAQ\u003c/a\u003e for fast information.\u003c/p\u003e","title":"Exposing DotNetArabi for OData"},{"content":"Last Saturday we had a SharePointSaturday event here in Jordan, in which I had the pleasure of interviewing Joel Oleson and Michael Noel for DotNetArabi.\nAt the end of Joel’s valuable interview, which can happen only in a life time, I stopped the recording by hitting the “Stop” button, simple. Surprisingly, instead of stopping the recording, Audacity just froze! I could hear myself screaming inside “NOOO!!!”, I guess even Joel heard that! the whole machine stuck that I had to force it to a Hard Shut down.\nBut knowing Audacity as a great piece of software, which really is, I hoped that I could still retrieve the recording. I rebooted and started Audacity again, and here comes the so refreshing alert at the start:\n“Some projects were not saved properly the last time Audacity was run. Fortunately, the following projects can automatically be recovered”\nTHAT is a successful software! of course I lost portions of the recording still, but I can’t complain; I have most of the interview. So, When you design your software, DO make sure you don’t crash gracefully only, but yet to recover correctly from the crash.\n","permalink":"https://emadashi.com/2010/03/if-crashing-gracefully-is-nice-recovering-from-it-is-awesome/","summary":"\u003cp\u003eLast Saturday we had a \u003ca href=\"http://www.sharepointsaturday.org/jordan/default.aspx\"\u003eSharePointSaturday\u003c/a\u003e event here in Jordan, in which I had the pleasure of interviewing \u003ca href=\"http://twitter.com/joeloleson\"\u003eJoel Oleson\u003c/a\u003e and \u003ca href=\"http://twitter.com/michaeltnoel\"\u003eMichael Noel\u003c/a\u003e for \u003ca href=\"http://www.dotnetarabi.com\"\u003eDotNetArabi\u003c/a\u003e.\u003c/p\u003e\n\u003cp\u003eAt the end of Joel’s valuable interview, which can happen only in a life time, I stopped the recording by hitting the “Stop” button, simple. Surprisingly, instead of stopping the recording, \u003ca href=\"http://audacity.sourceforge.net/\"\u003eAudacity\u003c/a\u003e just froze! I could hear myself screaming inside “NOOO!!!”, I guess even Joel heard that! the whole machine stuck that I had to force it to a Hard Shut down.\u003c/p\u003e","title":"If Crashing Gracefully Is Nice, Recovering From It Is Awesome"},{"content":"After publishing 8 episodes of DotNetArabi, I think it would be nice to share on this blog how it goes and what equipment needed in the process. But before we begin, dear reader, note that I am not an expert, I am still in the beginning of the way, though it’s going good so far.\nMy working machine is HP dv 6700 laptop, my first trials with recording was with simple microphone like the ones you use for chats; recording in winter made things smooth, but when summer came a long the heating problem became obvious in the low quality of the audio recorded, in addition to the higher target I needed anyway, so a different measure had to take place.\nI looked for an audio device that would clear the recording of any noise that is caused by the internal electrical and the fan. I had different options then, but the most interesting one was the MobilePre USB audio interface which I finally got. It takes analog inputs (2 of which are XLR) and transforms to digital signal view USB.\nOf course it appeared that it is over bloated than what I really needed, but I liked it anyway and produced the quality I looked for, though if you are going to record voice only, I believe there are other devices with lower cost.\nTo complete the set I got myself two XLR Microphones, not fancy ones, 15 JD’s each (about 22 US $) and that was it.\nNow on the software side I use Audacity, I find it the best free audio software.\nAfter all that, you’d find it surprising that you still need to use the Noise Removal feature in Audacity. And by that you can have your own podcast 🙂\n","permalink":"https://emadashi.com/2010/01/dotnetarabi-podcast-equipment/","summary":"\u003cp\u003eAfter publishing 8 episodes of DotNetArabi, I think it would be nice to share on this blog how it goes and what equipment needed in the process. But before we begin, dear reader, note that I am not an expert, I am still in the beginning of the way, though it’s going good so far.\u003cimg loading=\"lazy\" decoding=\"async\" style=\"border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; margin-left: 0px; border-left-width: 0px; margin-right: 0px\" title=\"pavillion\" border=\"0\" alt=\"pavillion\" align=\"right\" src=\"/wp-content/uploads/2010/01/pavillion.jpg\" width=\"212\" height=\"212\" /\u003e\u003c/p\u003e\n\u003cp\u003eMy working machine is HP dv 6700 laptop, my first trials with recording was with simple microphone like the ones you use for chats; recording in winter made things smooth, but when summer came a long the \u003ca href=\"http://www.emadashi.com/index.php/2008/07/new-laptop/\" target=\"_blank\"\u003eheating problem\u003c/a\u003e became obvious in the low quality of the audio recorded, in addition to the higher target I needed anyway, so a different measure had to take place.\u003c/p\u003e","title":"DotNetArabi Podcast Equipment"},{"content":"I just finished a session about Communication Skills one-to-one for the MSP program with Microsoft and Jordev. As I promised the audience, here are the slides shared on the very good site SlideShare:\nCommunication Skills one To one\nView more presentations from Emad Alashi. ","permalink":"https://emadashi.com/2009/11/communication-skills-session-at-msp-jordev/","summary":"\u003cp\u003eI just finished a session about Communication Skills one-to-one for the MSP program with Microsoft and Jordev. As I promised the audience, here are the slides shared on the very good site \u003ca href=\"http://www.slideshare.com\"\u003eSlideShare\u003c/a\u003e:\u003c/p\u003e\n\u003cdiv style=\"width:425px;text-align:left\" id=\"__ss_2551627\"\u003e\n  \u003ca style=\"font:14px Helvetica,Arial,Sans-serif;display:block;margin:12px 0 3px 0;text-decoration:underline;\" href=\"http://www.slideshare.net/splashup/communication-skills-one-to-one\" title=\"Communication Skills one To one\"\u003eCommunication Skills one To one\u003c/a\u003e\u003c/p\u003e \n  \u003cdiv style=\"font-size:11px;font-family:tahoma,arial;height:26px;padding-top:2px;\"\u003e\n    View more \u003ca style=\"text-decoration:underline;\" href=\"http://www.slideshare.net/\"\u003epresentations\u003c/a\u003e from \u003ca style=\"text-decoration:underline;\" href=\"http://www.slideshare.net/splashup\"\u003eEmad Alashi\u003c/a\u003e.\n  \u003c/div\u003e\n\u003c/div\u003e","title":"Communication Skills Session at MSP – Jordev"},{"content":"\nI have been reading this book Growing Software by Louis Testa, and I consider it the book of the year for me.\nThe book is a about how to create a robust successful software; starting from assembling your engineering team, to having a flourishing company with successful software product/services and happy customers.\nIf you are a new Development Manager, or already a Dev. manager who is in a small company growing fast, this book is for you.\nThere are many reasons why I find this book so valuable, here is a list of them:\nScope: I haven’t come across any book that covers this scope of what should be done to create successful software; usually books would talk about the SDLC, Development Methodology and Process, engineering techniques…etc, and if you are lucky maybe about some of the best practices around that.\nThis book, on the other hand, covers a lot more; it starts from the real beginning of understanding the environment around you, creating an effective engineering team and growing it, defining your product, defining releases, project estimation, project execution, choosing a process, enhancing the process, communicating with other departments, handling customers… and it even covers the future by setting directions, product roadmap and strategy. You can check the main table of contents here Practical: the book is obviously coming from a practical background, it tackles details that won’t be found unless the author really KNOWS what he is talking about, and that he actually lived that experience.\nThis is especially obvious when the author talks about the wrong way of doing things. for example, I have always thought adding an unplanned extra feature to a release is a good thing, in fact that was a NO in Growing Software with enough good reasons.\nThe real life examples of real instances took place (shown in grey boxes) added a great value; you will always stay skeptical about a theory until you hear someone who had lived it.\nAnother part of the practical side is the auxiliary spreadsheets the book provides to tackle certain decision-making situations. No Starch Press provide them for download from their site here. Realistic: The book doesn’t promise you with a sliver bullet, instead it puts the various options on the table and show you why/when you would choose one over the other depending on the situation, injecting this with the experience Mr. Louis Testa has.\nIt doesn’t tell you use Agile methodologies, RUP, or Waterfall…it helps you how to choose a process, how to customize it to fit your organization, and how to improve it. For Humans: actually this is one of the best things I liked about the book; I have always believed that we can’t separate business, process, establishments, or evolution without considering the emotions, the culture, and the mentality of the humans involved.\nReading throughout the book, you can see that this was kept between the eyes all along when it talks about engineers, fellow executives, or customers. Tackling emotions, behavior, expectations and negotiation. Politics was significantly considered in the book when taking decisions or dealing with the different parties Simple: It’s simple; the language is easy to understand, and the structure and sequence of the book is logical. I had no interpretation burden while reading it. Though, the addressed character in the book is a development manager or a CTO strictly; I’d have really loved if it had shed more light on the Business side of the story, I know it would have widened the scope even more but I believe this is becoming a large need in the Software Industry in general, maybe in another book.\nAnother thing is that sometimes the book digs little bit too deep in the self-management advices, to extent that intelligent people might want to skip it whole together.\nI’d definitely recommend this book for everyone who is interested in Growing his Software house, or being part of it.\n","permalink":"https://emadashi.com/2009/10/growing-software-book-review/","summary":"\u003cp\u003e\u003ca href=\"http://nostarch.com/growingsoftware.htm\" target=\"_blank\"\u003e\u003cimg loading=\"lazy\" decoding=\"async\" style=\"border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; margin-left: 0px; border-left-width: 0px; margin-right: 0px\" title=\"growingsoftware\" border=\"0\" alt=\"growingsoftware\" align=\"right\" src=\"/wp-content/uploads/2009/10/growingsoftware.jpg\" width=\"202\" height=\"260\" /\u003e\u003c/a\u003e\u003c/p\u003e\n\u003cp\u003eI have been reading this book \u003ca href=\"http://nostarch.com/growingsoftware.htm\"\u003eGrowing Software by Louis Testa\u003c/a\u003e, and I consider it the book of the year for me.\u003c/p\u003e\n\u003cp\u003eThe book is a about how to create a robust successful software; starting from assembling your engineering team, to having a flourishing company with successful software product/services and happy customers.\u003cbr\u003e\nIf you are a new Development Manager, or already a Dev. manager who is in a small company growing fast, this book is for you.\u003c/p\u003e","title":"“Growing Software” book review"},{"content":" Sometimes development tools can be very tempting to a degree that you just want to open the IDE and start hitting those keys. Though it’s not always within the IDE; here is a list of development tools, without specific order, that are just so sweet and pretty crucial to teams opt for best development environment!\nMSBuild or NAnt\nBuild automation tools by which a developers can use XML scripts to automate all the hassle tasks of creating a build: retrieving code from the source control (SC), labeling the source code, building it, zipping it, emailing info, and many other tasks. Both tools are free. CruiseControl or TeamCity\nContinuous Integration servers that utilize the build automation tools to add extra slick functionalities like monitoring the SC, issuing specific commands on specific actions done on the SC. CruiseControl is free while TeamCity is not.\nI once heard a really interesting utilization of such servers; the dev team had red and green bulbs placed in a noticeable area where everybody could see them. On each code check-in action the servers would initiate a build on the server, so if the code builds successfully the green bulb would light up, if the build fails the red bulb lights up instead. nice ha! 😀 Tarantino\nI still haven’t got the chance to work on this tool, but it says it does the thing I really wish more companies start to embrace; which is having a separate database instance for each developer instead of shared databases.\nThis tool would let the database changes to be incorporated into the SC as easy as code check-in’s (including Schema changes). So in any instance of time, the developer will be able to get latest version of code and sequence of scripts and work on clean ready environment where code and database schema is 100% compatible. RedGate Sql Compare\nIt enables you to compare two database instances and to elicit a change script from this comparison. One of the many features, by which it supersedes its free counter part SQLCompare, is that it can be initiated from Command Prompt. costs at least $390. TortoiseSVN\nSVN(SubVersion) is an open source SC. TortiseSVN is an SVN client that integrates with the Windows shell. Lovely, robust and free. AnkhSVN\nit’s an SVN client too, but integrates with Visual Studio so you don’t have to leave the IDE to manage versions, indispensable. It’s free. TFS sidekicks\nif you have ever dealt with TFS administration, you’d know how cumbersome it is. TFS SideKicks is the solutions, period! NUnit or xUnit\nFor the ones who haven’t heard of Unit Testing tools (I hope you are few!), you will be able to write code to test your code; and with nice GUI which tells which part of your code fails. Both are free. IE8 Developers tools, Firebug for Firefox\nThese are awesome client side environment tools; Debug Javascript, Profile Javascript, and manipulate CSS on the fly. web devs can’t live without it really. both are free. Fiddler\ninspects http requests made from your browser, with details to the smallest bit came into your machine through http. It’s free WinMerge\nThe best diff tool out there, I wish I could replace it with every IDE Source Control plugins, it compares folders too. It’s free. BugTracker.Net\nIf you have a small team of devs who work on low cost and tight budget project where you can’t use Jira? this is THE bug tracker software I choose. I love their new feature integrating with SVN. And it’s free. DPack\nCode navigation tool; light, handy, free. CodeRush or Resharper\ncode assistant and enhancement tools, makes you create, change, refactor code in couple of key strokes. They are both not free except CodeRush has an Xpress version I am sure there are others slipped out of my mind, but I believe those are fun enough to play around with. enjoy 🙂\n","permalink":"https://emadashi.com/2009/09/nice-development-tools/","summary":"\u003cp\u003e\u003ca href=\"http://www.emadashi.com/wp-content/uploads/2009/09/toolkit.jpg\"\u003e\u003cimg loading=\"lazy\" decoding=\"async\" style=\"border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; margin-left: 0px; border-left-width: 0px; margin-right: 0px\" title=\"tool-kit\" border=\"0\" alt=\"tool-kit\" align=\"right\" src=\"/wp-content/uploads/2009/09/toolkit-thumb.jpg\" width=\"260\" height=\"188\" /\u003e\u003c/a\u003e Sometimes development tools can be very tempting to a degree that you just want to open the IDE and start hitting those keys. Though it’s not always within the IDE; here is a list of development tools, without specific order, that are just so sweet and pretty crucial to teams opt for best development environment!\u003c/p\u003e","title":"Nice Development Tools"},{"content":" Episode 5 of DotNetArabi podcast is published on www.dotnetarabi.com\nMohamad Meligy talked in this episode about ORM (Object Relational Mapping), he explained in details how they work, why we need them, their advantages and disadvantages, and listed some of the known ORM engines.\nلقد تم نشر الحلقة الخامسة من دوت نت عربي على www.dotnetarabi.com. تحدث فيها محمد مليجي بإسهاب عن\nالـ ORM (Object Relational Mapping). مفصلا ماهيتها، و كيف تعمل، و حسناتها و سيئاتها، و ذكر كذلك بعضا من المكتبات البرمجية منها و حسناتها. ","permalink":"https://emadashi.com/2009/08/dotnetarabi-episode-5-%D8%AF%D9%88%D8%AA-%D9%86%D8%AA-%D8%B9%D8%B1%D8%A8%D9%8A-%D8%A7%D9%84%D8%AD%D9%84%D9%82%D8%A9-%D8%A7%D9%84%D8%AE%D8%A7%D9%85%D8%B3%D8%A9/","summary":"\u003cp\u003e\u003ca href=\"http://www.dotnetarabi.com/\"\u003e\u003cimg decoding=\"async\" src=\"/wp-content/uploads/2009/04/dotnetarabi_1.jpg\" alt=\"\" /\u003e\u003c/a\u003e    \u003ca href=\"http://www.dotnetarabi.com/\"\u003e\u003cimg decoding=\"async\" src=\"/wp-content/uploads/2009/04/dotnetarabi_2.jpg\" alt=\"\" /\u003e\u003c/a\u003e\u003c/p\u003e\n\u003cp\u003eEpisode 5 of DotNetArabi podcast is published on \u003ca href=\"http://www.dotnetarabi.com\"\u003ewww.dotnetarabi.com\u003c/a\u003e\u003c/p\u003e\n\u003cp\u003eMohamad Meligy talked in this episode about \u003ca href=\"http://en.wikipedia.org/wiki/Object-relational_mapping\"\u003eORM (Object Relational Mapping)\u003c/a\u003e, he explained in details how they work, why we need them, their advantages and disadvantages, and listed some of the known ORM engines.\u003c/p\u003e\n\u003cp style=\"direction: rtl\" align=\"right\"\u003e\n  لقد تم نشر الحلقة الخامسة من دوت نت عربي على www.dotnetarabi.com. تحدث فيها محمد مليجي بإسهاب عن\u003cbr /\u003e الـ \u003cspan dir=\"ltr\"\u003e\u003ca href=\"http://en.wikipedia.org/wiki/Object-relational_mapping\"\u003eORM (Object Relational Mapping)\u003c/a\u003e\u003c/span\u003e. مفصلا ماهيتها، و كيف تعمل، و حسناتها و سيئاتها، و ذكر كذلك بعضا من المكتبات البرمجية  منها و حسناتها.\n\u003c/p\u003e","title":"DotNetArabi Episode 5 دوت نت عربي الحلقة الخامسة"},{"content":"It\u0026rsquo;s a waste of time trying to explain how important communication is in life, whether it is at work or personal life. So I will start immediately in group of points I find it to be basics when it comes to successful communication in general, and verbal communication in specific.\nHere is the list of actions you need to take in order to explain your thoughts as clear as and descriptive as possible. I tried to put them in their proper order considering the communication process, though they can overlap:\nAt the beginning of the conversation, make sure that the goal of the conversation is clear\ne.g. “the goal of this discussion is to discuss the problem x, and to find a proper solution for it” Put the listener in the context instantly\ne.g. “Remember the remark our client made on the page where we list his system users?” Unify the terms used in the discussion; giving special words to commonly used meanings and expressions\ne.g. “users who are still work for the company but for some reason they are not available we will call them Deactivated Users, users who don\u0026rsquo;t work for the company anymore will be called Deleted Users” Start from common ground of information\ne.g. “As you already know, this list is too long and a scrollbar shows, and you know too that the architecture team provided us with a tool for paging, now the problem is\u0026hellip;” Sequence of thoughts is highly important; you should start from the most intrinsic and basic thought and build on it to conclude to the next, each thought should be a building block for the next\ne.g. “we are advised to use tool x for this problem, tool x uses technology y, technology y requires us to buy that license, and we cannot afford it right now, so what we can do is\u0026hellip;” Aside from the terms in point 3, use language words that are understandable by the listener; don\u0026rsquo;t use a unique dialect for example. Don\u0026rsquo;t deviate from the subject or add information that is useless to the subject; the more you talk about irrelevant subjects, the closer to failure the communication would be. This point too should be explained with bad example:\ne.g. “Yes, this can be fixed but it only requires a small action from Ahmad, who happens to be working with the architecture team right now, on a new feature in the framework that might add a new challenge to our application because we will have to change the\u0026hellip;.”! Don\u0026rsquo;t try to over explain the idea more than it needs; use short expressive words.\ne.g. “I get server error exception” rather than “I get error showing tags and line of code in the vb file where the error happened because it is an error from the server as you know”! Talk in digestible speed, a speed that suits the listener not you; reminding to point 5, thoughts are delivered in sequence, make sure the listener digested the current before you move to the next Ask questions that help the listener to understand, when you already know the answer, but you want to reach certain point with the question where the listener will have to think clearly about it\ne.g. “When request a page, what happens on the server?” Confirm that the listener is following right by asking regularly\ne.g. “are you following?” If the listener failed to understand at some point do the following: Ask what part exactly he didn\u0026rsquo;t understand in order to take the proper action. DON\u0026rsquo;T REPEATE THE SAME SENTENCE! Rephrase the sentence in a more understandable way (needs a lot of training, I agree). Step one level back in your sequence of thoughts, probably the listener didn\u0026rsquo;t understand because of failure in explaining the previous thought. By this I end the basics of successful communication, it\u0026rsquo;s not easy to follow these steps I am sure, it needs a lot of practice, especially when it comes to choosing words and preparing the sequence of thoughts. But if you practice enough and ; you master it, your life will be much easier\nI hope you benefit and have a nice discussions around 🙂 ","permalink":"https://emadashi.com/2009/08/basics-of-successful-communication/","summary":"\u003cp\u003e\u003cimg loading=\"lazy\" decoding=\"async\" style=\"border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px\" border=\"0\" alt=\"Communication\" align=\"right\" src=\"/wp-content/uploads/2009/08/windowslivewriterbasicsofsuccessfulcommunication-10967communication-3.jpg\" width=\"276\" height=\"287\" /\u003eIt\u0026rsquo;s a waste of time trying to explain how important communication is in life, whether it is at work or personal life. So I will start immediately in group of points I find it to be basics when it comes to successful communication in general, and verbal communication in specific.\u003c/p\u003e\n\u003cp\u003eHere is the list of actions you need to take in order to explain your thoughts as clear as and descriptive as possible. I tried to put them in their proper order considering the communication process, though they can overlap:\u003c/p\u003e","title":"Basics Of Successful Communication"},{"content":" I just published episode 4 of the DotNetArabi podcast on www.dotnetarabi.com.\nThis episode was with guest Mohammad Zayed, he works as Strategic Technology Specialist in Microsoft Jordan. he worked on different Microsoft technologies ranging from Windows Forms applications, Web Forms and Mobile.\nMohammad talks in this episode about Sharepoint, the in\u0026rsquo;s and out\u0026rsquo;s, the benefits and the challenges.\nلقد تم نشر الحلقة الرابعة من دوت نت عربي على www.dotnetarabi.com ، التي كان الضيف فيها محمد زايد. يعمل محمد زايد حاليا كمتخصص تقنيات استراتيجي لكبار العملاء في مايكروسوفت الأردن. و تكلم في هذه الحلقة عن الـ Sharepoint: ماهيته، و ما يلزم لتثبيته، و تراخيصه، و نقاط قوته، و نقاط التحدي فيه، و الكثير من المعلومات القيمة. ","permalink":"https://emadashi.com/2009/08/dotnetarabi-episode-4/","summary":"\u003cp\u003e\u003cimg decoding=\"async\" src=\"/wp-content/uploads/2009/04/dotnetarabi_1.jpg\" /\u003e  \u003cimg decoding=\"async\" src=\"/wp-content/uploads/2009/04/dotnetarabi_2.jpg\" /\u003e\u003c/p\u003e\n\u003cp\u003eI \u003cstrike\u003ejust\u003c/strike\u003e published episode 4 of the DotNetArabi podcast on \u003ca href=\"http://www.dotnetarabi.com\"\u003ewww.dotnetarabi.com\u003c/a\u003e.\u003c/p\u003e\n\u003cp\u003eThis episode was with guest Mohammad Zayed, he works as Strategic Technology Specialist in Microsoft Jordan. he worked on different Microsoft technologies ranging from Windows Forms applications, Web Forms and Mobile.\u003cbr\u003e\nMohammad talks in this episode about Sharepoint, the in\u0026rsquo;s and out\u0026rsquo;s, the benefits and the challenges.\u003c/p\u003e\n\u003cp style=\"direction: rtl\" align=\"right\"\u003e\n  لقد تم نشر الحلقة الرابعة من دوت نت عربي على \u003ca href=\"http://www.dotnetarabi.com\"\u003ewww.dotnetarabi.com\u003c/a\u003e ، التي كان الضيف فيها محمد زايد. يعمل محمد زايد حاليا كمتخصص تقنيات استراتيجي لكبار العملاء في مايكروسوفت الأردن. و تكلم في هذه الحلقة عن الـ Sharepoint: ماهيته، و ما يلزم لتثبيته، و تراخيصه، و نقاط قوته، و نقاط التحدي فيه، و الكثير من المعلومات القيمة. \n\u003c/p\u003e","title":"DotNetArabi Episode 4 دوت نت عربي الحلقة الرابعة"},{"content":" Actually it can be “Could Not Load Type” too, but the reason is the same: you are referencing the wrong DLL version.\nwell, this is totally understandable; of course you are going to get this exception when you use an outdated DLL that lacks the new extra parameter to THAT certain method. But the interesting part is it will not happen when you first run your application, and neither when execution reaches the changed method; it will happen when code-execution reaches a place that REFERENCES that changed method.\nlets look at the following example.\nI have created two projects: Windows Forms project called “HostDLL”, and a Class Library project called “BadDLL”.\nThe HostDLL references the BadDLL; upon clicking a button in the form, the HostDLL will create an instance of class “BadClass” and call the method “DoStuff” which takes two integer parameters.\neverything goes fine:\n20 private void button1_Click(object sender, EventArgs e) 21 { 22 BadClass bc = new BadClass(); 23 int x = 3, y = 10; 24 25 bool never = false; 26 if (never) 27 { 28 bc.DoStuff(x, y); 29 } 30 MessageBox.Show(“Done successfully”); 31 } Notice the IF clause in line 26, and notice that calling the method “bc.DoStuff” will never take place because the “never” variable is always false.\nNow, intentionally, we will make a breaking change in the BadDLL; adding a new integer parameter z to the DoStuff method (we will make this change AFTER we have compiled the HostDLL so we don\u0026rsquo;t get compile-time correction).\nRun the applicaion HostDLL to show the form, you will notice that there is no error, even when the BadDLL has been changed. Now hit the button… you will get a run-time error that says “Method Not Found”. The interesting part of the story is that even though DoStuff will never get called, yet we will still get this run-time error.\nThe reason is that the JIT compiler does what it\u0026rsquo;s called after: “Just-In-Time Compiler“; using help from the “CLR via C#” book authored by Jeffery Richter, specifically in “Executing Your Assembly\u0026rsquo;s Code” section, the explanation is that:\nTo execute a method, its Intermediate Language must first be converted to native CPU instructions. This is the job of the CLR\u0026rsquo;s JIT (just-in-time) compiler…Just before the method executes, the CLR detects all of the types that are referenced by the method\u0026rsquo;s\ncode (in our case it\u0026rsquo;s the BadClass). This causes the CLR to allocate an internal data structure that is used to manage access to the referenced types.\nThe author continues in a graph in which he explains the process:\nIn the assembly that implements the type, look up the method being called in the metadata From the metadata, get the IL for this method Allocate a block of memory Compile the IL into native CPU instructions So it is at that point the code is compiled, and at that point the JIT discovers that there is a type (which is BadClass in our case) is referenced having an invalid method with one extra parameter.\nSo always be careful when you reference other DLL\u0026rsquo;s, if you don\u0026rsquo;t make sure you have the right version, you will be subject to a potential lovely RTE message 🙂\n","permalink":"https://emadashi.com/2009/08/jit-compiler-and-method-not-found-error/","summary":"\u003cimg loading=\"lazy\" decoding=\"async\" style=\"border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px\" border=\"0\" alt=\"CropperCapture[20]\" src=\"/wp-content/uploads/2009/08/windowslivewriterjitcompilerandmethodnotfounderror-150f9croppercapture20-3.jpg\" width=\"396\" height=\"152\" /\u003e \n\u003cp\u003eActually it can be “\u003cem\u003eCould Not Load Type\u003c/em\u003e” too, but the reason is the same: you are referencing the wrong DLL version.\u003c/p\u003e\n\u003cp\u003ewell, this is totally understandable; of course you are going to get this exception when you use an outdated DLL that lacks the new extra parameter to THAT certain method. But the interesting part is it will not happen when you first run your application, and neither when execution reaches the changed method; it will happen when code-execution reaches a place that REFERENCES that changed method.\u003c/p\u003e","title":"JIT compiler and \"Method Not Found\" error"},{"content":"قبل أيام، كتب أخي عمر قعدان في مدونته مقالا بعنوان “شيفرة مصدرية للقراءة” و في آخره استعمل أسلوب “الموجة” في المدونات و هو أسلوب مبتكر في عالم التدوين يقوم صاحبه بكتابة مقال، ثم يطلب في آخر المقال من مدونين معينين كتابة المقال نفسه لكن من تجربتهم الشخصية، و بدورهم يفعلون الأمر ذاته مع آخرين إن أرادوا.\nيطلق على هذا الأسلوب في الإنجليزية كلمة “Tagging” و برأيي أن أقرب مرادف لهذا المعنى في اللغة العربية ضمن هذا السياق هو كلمة “موجة”. و ها أنا أستجيب للموجة التي أطلقها أخي عمر.\nأفصح عمر في مقالتين له عن كيفية تطوير المبرمج لنفسه، و طلب في موجته الإجابة عن ثلاثة أسئلة:\nكيف تصقل مهارتك كمبرمج؟ ما رأيك بفكرة قراءة الشيفرة المصدرية للتعلم؟ و هل هناك برامج مفتوحة المصدر تعلمت منها؟ بالنسبة لي، صقل المهارة يكون: بالتأسيس من خلال القراءة و العلم النظري، و من ثم بالاستكمال في التطبيق العملي. فبدون أي من هذين الجناحين لا أتصور نجاح أي مبرمج أو تقني. فالقراءة و الجانب النظري يثري الجانب العلمي، و التطبيق يأكده؛ إما أن يشكك في صحته و ينفيه، أو يزيد من يقينه.\nو إذا ولجنا بتفصيل أكبر في الموضوع، أرى أن في الجناح الأول – و هو الجانب النظري- قد تقيدنا فيه النقاط التالية:\nبالنسبة للمواضيع الأساسية و القواعد الأولى لأي علم، يكون المصدر الأمثل للمعلومة هو الكتاب المفصل أو المقال الطويل أو المتسلسلات Tutorials (أروعها بالنسبة لي 4guysfromrolla)؛ فلأهميتها لا بد من قراءة متمعنة و عميقة ترسم في الذهن الأبعاد كلها، و تستكمل جميع جوانب الموضوع بتفصيل واسع و دقيق. أمثلة على هذه المواضيع: في عمل البرمجة بالدوت نت “أنواع المتغيرات في الـدوت نت”، في علم البرمجة في مجال الإنترنت “دورة حياة صفحة الـASP.NET” و هلم جر. أما إذا كنت تبحث في علم لست مهتما به كثيرا، أو بعلم يهمك لكن بموضوع يلامسه من بعيد -نسبيا-، فتكون من خلال قراءة المقالات العامة، و التدوينات، و الفيديوهات (أولي بها أهمية أكبر لنجاعتها بتوصيل المعلمومة، و أضيف على عمر فيديوهات ASP.NET)، أو حضور المحاضرات التي تكون بمثابة “مدخل” لهذا العلم. سؤال و متابعة المحترفين؛ مثل متابعة المدونات كمدونة: “سكوت ميتشيل Scott Mitchel” و “سكوت جوثري Scott Guthrie“، أو استخدام تويتر twitter. قراءة “الشيفرة المصدرية” أو الـ Source Code لبرامج أنشأها مبرمجون محترفون في المجتمع، و هي من أهم طرق تحصيل العلم البرمجي؛ فهي مثال حقيقي مجرب بأيدي محترفين ذوي سنوات طويلة من الخبرة، تستطيع من قراءة المصدر أن تفهم كيف يفكر، و متى يستخدم أسلوبا معينا، و كيف يحل معضلة واقعية مشهورة. أمثلة: ASP.NET MVC Nerddinner، RSS.net، و Ninject. تعليم الآخرين و إعطاء المحاضرات أو كتابة المدونات إن أمكن، فلا يزيد ترسيخ المعلومة -بعد التطبيق- أكثر من تعليم الآخرين (و هنا أقول لا تبخل بالمعلومة أبدا أبدا، فالخير العائد إليك أكبر بكثير من ما قد يخطر على بالك من الخسارة إن وجدت). أما بالنسبة للتطبيق فهو استكمال البناء، فلقد تعلمت من بنيان Bunian أكثير من أي شيء آخر (على الرغم من أنه غير مستكمل لغاية الآن)؛ فإن تابع الشخص كل مدونين التكنولوجيا، و قرأ كتب العظماء، و شاهد جميع الفيديوهات و المتسلسلات، و لم يفتح Visual Studio و طبق ما عرف، فاعلم أنه ليس سوى فقاعة كبيرة -و للأسف-، و سيخونه علمه في أبسط التحديات البرمجية على الطريق.\nو أخيرا، من أكثر ما يزيد مهارة الشخص، هو الهمة في التحصيل، و هذه الهمة تزيد أضعافا عند مشاركة الآخرين، سواء في مجتمعات البرمجة الحقيقية (كـ Jordev هنا في الأردن)، أو كالمجتمعات على الإنترنت (كـ www.vb4arab.com). فبمجرد أن تتكلم مع من يشاركك هذا الشغف، لن تتمالك نفسك حتى تعود للمنزل و تفتح الجهاز و تستمع بسماع صوت طرق لوحة المفاتيح :).\nو أمرر هذه الموجة إلى كل من: أحمد أبو عرجة، و طارق سيالة. دون أن يكون هذا على وجه الإلزام.\n","permalink":"https://emadashi.com/2009/07/grow-your-self/","summary":"\u003cp\u003eقبل أيام، كتب أخي عمر قعدان في مدونته مقالا بعنوان “\u003ca href=\"http://blog.jerashdev.net/2009/07/blog-post_20.html\"\u003eشيفرة مصدرية للقراءة\u003c/a\u003e” و في آخره استعمل أسلوب “الموجة” في المدونات و هو أسلوب مبتكر في عالم التدوين يقوم صاحبه بكتابة مقال، ثم يطلب في آخر المقال من مدونين معينين كتابة المقال نفسه لكن من تجربتهم الشخصية، و بدورهم يفعلون الأمر ذاته مع آخرين إن أرادوا.\u003c/p\u003e\n\u003cp\u003eيطلق على هذا الأسلوب في الإنجليزية كلمة “Tagging” و برأيي أن أقرب مرادف لهذا المعنى في اللغة العربية ضمن هذا السياق هو كلمة “موجة”. و ها أنا أستجيب للموجة التي أطلقها أخي عمر.\u003c/p\u003e","title":"“طور نفسك برمجيا”…موجة من عمر قعدان"},{"content":" I just published episode 3 of the DotNetArabi podcast on www.dotnetarabi.com.\nThis episode was with guest Mahmoud Alamanasrah, who have 7 years of experience on data-driven web applications with SQL Server. The episode was about the new features of SQL Server 2008, great for all developers who interact closely with SQL Server.\nعلى موقع www.dotnetarabi.com تجدون الحلقة الثالثة من “دوت نت عربي”. موضوع الحلقة هو الـ”إس كيو إل سيرفر 2008 SQL Server”، عن آخر المستجدات و بعض النصائح العامة.\nكان ضيف الحلقة الزميل محمود المناصرة، و هو عضو نشط في مجتمع مطروي الـ”دوت نت” في الأردن Jordev، لديه 7 سنوات من الخبرة و يعمل حاليا كـ “Technical Team Leader” أي قائد فريق مبرمجين. ","permalink":"https://emadashi.com/2009/07/dotnetarabi-episode-3/","summary":"\u003cp\u003e\u003ca href=\"http://www.dotnetarabi.com/\"\u003e\u003cimg decoding=\"async\" src=\"/wp-content/uploads/2009/04/dotnetarabi_1.jpg\" alt=\"\" /\u003e\u003c/a\u003e  \u003ca href=\"http://www.dotnetarabi.com/\"\u003e\u003cimg decoding=\"async\" src=\"/wp-content/uploads/2009/04/dotnetarabi_2.jpg\" alt=\"\" /\u003e\u003c/a\u003e\u003c/p\u003e\n\u003cp\u003eI just published episode 3 of the DotNetArabi podcast on \u003ca href=\"http://www.dotnetarabi.com\"\u003ewww.dotnetarabi.com\u003c/a\u003e.\u003c/p\u003e\n\u003cp\u003eThis episode was with guest Mahmoud Alamanasrah, who have 7 years of experience on data-driven web applications with SQL Server. The episode was about the new features of SQL Server 2008, great for all developers who interact closely with SQL Server.\u003c/p\u003e\n\u003cp style=\"text-align: right; direction: rtl\"\u003e\n  على موقع \u003ca href=\"http://www.dotnetarabi.com\"\u003ewww.dotnetarabi.com\u003c/a\u003e تجدون الحلقة الثالثة من “دوت نت عربي”. موضوع الحلقة هو الـ”إس كيو إل سيرفر 2008 SQL Server”، عن آخر المستجدات و بعض النصائح العامة.\u003cbr /\u003e كان ضيف الحلقة الزميل محمود المناصرة، و هو عضو نشط في مجتمع مطروي الـ”دوت نت” في الأردن Jordev، لديه 7 سنوات من الخبرة و يعمل حاليا كـ “Technical Team Leader” أي قائد فريق مبرمجين.\n\u003c/p\u003e","title":"DotNetArabi Episode 3 دوت نت عربي الحلقة الثالثة"},{"content":"The other day I was roaming the Internet; link here link there, tweet here tweet there, and I stumbled upon a very nice game called Geocaching.\nGeocaching, simply, is a game in which players hide items in any place in the world, and the other players should find, yes…Treasure Hunt. But the fun part is it\u0026rsquo;s Global, and the GPS is your primary tool!\nThe players who want to hide an item, should first label it and give it a unique identifier, then record the coordinates (longitude and latitude) of the place they hide it in, and finally they should post the information along with the coordinates on the game\u0026rsquo;s website www.geocaching.com.\nAnd I was lucky enough to know that there are 17 geocaches in Jordan! below is an image of my first geocache quest result with my good friend Tamim Salem, using my iPhone\u0026rsquo;s GPS.\nThe item was broken and this paper is the only thing left.\nCan\u0026rsquo;t wait to quest the rest 😉\n","permalink":"https://emadashi.com/2009/06/got-a-gps-lets-play-geocaching/","summary":"\u003cp\u003eThe other day I was roaming the Internet; link here link there, tweet here tweet there, and I stumbled upon a very nice game called Geocaching.\u003cbr\u003e\n\u003ca href=\"http://en.wikipedia.org/wiki/Geocaching\"\u003eGeocaching\u003c/a\u003e, simply, is a game in which players hide items in any place in the world, and the other players should find, yes…Treasure Hunt. But the fun part is it\u0026rsquo;s Global, and the GPS is your primary tool!\u003c/p\u003e\n\u003cp\u003eThe players who want to hide an item, should first label it and give it a unique identifier, then record the coordinates (longitude and latitude) of the place they hide it in, and finally they should post the information along with the coordinates on the game\u0026rsquo;s website \u003ca href=\"http://www.geocaching.com\"\u003ewww.geocaching.com\u003c/a\u003e.\u003c/p\u003e","title":"Got a GPS? …Lets Play Geocaching"},{"content":"We are working on this big project at work in which several teams are assigned to different modules. The modules are, naturally, overlapping in certain areas where they they need to interact with each other through API\u0026rsquo;s.\nOne of these modules is central and crucial to the rest of the modules, the dependency is very high that the team has to provide many API\u0026rsquo;s. Certain API\u0026rsquo;s was needed by different modules; our team needed a list of entity X, and another team also wanted a list of entity X, BUT…we had different criteria!\nFor example, Entity X had an Enum property called “Type”. The API provided a parameter to filter on this Type, but the options were limited to couple of choices; either you get entities of THIS type, or you get all entities. If you needed type A and B only, you will have to get all the entities in the database, or make two hits to the database and join the two lists.\nA solution was to give all the various options to the user as optional parameters some of which was Array of values. This resulted in an ugly API signature that had many optional parameters, and when ever a new criteria is needed, the signature would change and break all the already existing calls for the API, and I will not even imagine how the SP would look like!. An ugly alternative as well is to create new SP for each different criteria. Both choices are maintenance killers.\nIn such cases, the dynamic queries are just wonderful; depending on the properties the end user needs to filter on, a query will be created dynamically with proper operator passed. Usually ORM engines, or similar engines, will provide you with an “internal language”, e.g. SubSonic:\nEpisode ep = new Select().From\u0026lt;DA.Episode\u0026gt;().Where(\u0026#34;Title\u0026#34;).Like(\u0026#34;SOA\u0026#34;).ExecuteSingle\u0026lt;DA.Episode\u0026gt;(); Another example is the “query by example” in NHibernate (code snippet is taken from NHibernate help):\nIList episodes = session.CreateCriteria(typeof(Episode)) .Add(Expression.Like(\u0026#34;Title\u0026#34;, \u0026#34;SOA%\u0026#34;)) .List(); And, of course, LINQ:\nvar episodes = from x in db.Episodes where x.Title.Contains(\u0026#34;SOA\u0026#34;) select x; Or you can build your own ;).\nI hope this gives an insight.\n","permalink":"https://emadashi.com/2009/06/a-case-we-shouldnt-use-stored-procedures-in/","summary":"\u003cp\u003eWe are working on this big project at work in which several teams are assigned to different modules. The modules are, naturally, overlapping in certain areas where they they need to interact with each other through API\u0026rsquo;s.\u003c/p\u003e\n\u003cp\u003eOne of these modules is central and crucial to the rest of the modules, the dependency is very high that the team has to provide many API\u0026rsquo;s. Certain API\u0026rsquo;s was needed by different modules; our team needed a list of entity X, and another team also wanted a list of entity X, BUT…we had different criteria!\u003c/p\u003e","title":"A Case We Shouldn’t Use Stored Procedure’s In"},{"content":"There have been couple of code assistance and refactoring products for the Visual Studio IDE, two of the top listed is CodeRush and Resharper; they provide amazing and rich functionality regarding code refactoring and navigation.\nBut if the built-in refactorings in the Visual Studio itself suffices you (I am comfortable with it), then the only thing you need is DPack for Visual Studio; it\u0026rsquo;s a simple navigation utility by which you can navigate to the wanted File, Class, Method, or Property as easy as couple of strokes.\n“Alt + U” to navigate to a file, the list is filtered as you type and the matching isn\u0026rsquo;t necessarily made for the beginning of the word:\n“Alt + M” navigates to Methods:\n“Alt + Shift + P” navigates to Properties:\nvery simple and handy, one of the tools can\u0026rsquo;t live without it. DPack everybody.\n","permalink":"https://emadashi.com/2009/06/dpack-for-visual-studio-better-navigation/","summary":"\u003cp\u003eThere have been couple of code assistance and refactoring products for the Visual Studio IDE, two of the top listed is \u003ca href=\"http://www.devexpress.com/Products/Visual_Studio_Add-in/Coding_Assistance/\"\u003eCodeRush\u003c/a\u003e and \u003ca href=\"http://www.jetbrains.com/resharper/\"\u003eResharper\u003c/a\u003e; they provide amazing and rich functionality regarding code refactoring and navigation.\u003cbr\u003e\nBut if the built-in refactorings in the Visual Studio itself suffices you (I am comfortable with it), then the only thing you need is \u003ca href=\"http://www.usysware.com/dpack/Default.aspx\"\u003eDPack\u003c/a\u003e for Visual Studio; it\u0026rsquo;s a simple navigation utility by which you can navigate to the wanted File, Class, Method, or Property as easy as couple of strokes.\u003c/p\u003e","title":"DPack for Visual Studio, Better Navigation"},{"content":"The other day at work I finally had the chance to get my hands on code (see here why I\u0026rsquo;m so anxious about it 😛 ).\nWe were using the jQuery\u0026rsquo;s Drag and Drop feature, where the droppable areas (DIV\u0026rsquo;s) are marked as droppable and registered for the events like the following:\n126 function RegisterDroppable(DomID) { 128 $(‘#' + DomID).droppable({ 129 activeClass: ‘Droppable-active', 130 tolerance: ‘pointer', 131 hoverClass: ‘Droppable-hover', 132 drop: function(ev, ui) { 133 //some code for the drop event here 134 135 } 136 }); 137 } The issue was that those droppable DIV\u0026rsquo;s were created at client side, and they would change upon a user interaction with the page (old DIV\u0026rsquo;s disappear and new droppable DIV\u0026rsquo;s are created), all at client side.\nThe problem appeared when we tried to drag a “draggable” area AFTER changing the DIV\u0026rsquo;s the first time, the following javascript error showed:\n** “Error: Unspecified error.”**\nAfter investigating, it appeared that the plugin preserves a list of the droppables objects, and when we drag the “draggable” object, a loop that traverses the droppable objects would be called. But those DIV\u0026rsquo;s do not really exist any more, hence the error shows up.\nSo the solution was to empty that list of lost references of the droppables so we can make a new clean droppables list, I did the following: 87 var drop = $.ui.ddmanager.droppables[‘default']; 88 89 var count = drop.length; 90 for (var i = count; i \u003e 0; i-– ) { 91 drop[i-1].destroy(); 92 } I couldn\u0026rsquo;t find better way to access the list, there was scarse information on the web for a solution, I hope this helps you just in case.\n","permalink":"https://emadashi.com/2009/05/clear-jquery-droppable-list/","summary":"\u003cp\u003eThe other day at work I finally had the chance to get my hands on code (see \u003ca title=\"Technical Team Leader...Who Is Not\" href=\"http://www.emadashi.com/index.php/2009/04/technical-team-leaderwho-is-not/\" target=\"_blank\"\u003ehere\u003c/a\u003e why I\u0026rsquo;m so anxious about it 😛 ).\u003c/p\u003e\n\u003cp\u003eWe were using the jQuery\u0026rsquo;s Drag and Drop feature, where the droppable areas (DIV\u0026rsquo;s) are marked as droppable and registered for the events like the following:\u003c/p\u003e\n\u003cdiv style=\"font-family: Courier New; font-size: 10pt; color: black; background: white;\"\u003e\n  \u003cp style=\"margin: 0px;\"\u003e\n    \u003cspan style=\"color: #2b91af;\"\u003e  126\u003c/span\u003e \u003cspan style=\"color: blue;\"\u003efunction\u003c/span\u003e RegisterDroppable(DomID) {\n  \u003c/p\u003e\n  \u003cp style=\"margin: 0px;\"\u003e\n    \u003cspan style=\"color: #2b91af;\"\u003e  \u003c/span\u003e\u003cspan style=\"color: #2b91af;\"\u003e128\u003c/span\u003e        $(\u003cspan style=\"color: #a31515;\"\u003e‘#'\u003c/span\u003e + DomID).droppable({\n  \u003c/p\u003e","title":"Clear jQuery Droppable List"},{"content":"\nWhen I started this blog my goal was to make it a technical one, in which most posts would have code, samples, screen shots, architecture…etc. This was the primary goal, though it is totally fine with me to talk about software life in general.\nThe issue is that I get the ideas of my posts from my real daily life, which is mostly code challenges at work. I do write code in my leisure time, but for sure it is not as thorough as the thing at work.\nAnd since I haven\u0026rsquo;t posted any technical stuff lately…the simple conclusion is I DON\u0026rsquo;T SEE CODE ANYMORE!\nA Technical Team Leader in the place I work at right now has a different meaning from what I knew before; the first word in the title is “Technical” so I expect to deal a lot with code: planning it, reviewing it, discuss it with team members…etc.\nBut in the environment I work at, there is more pressure toward management and coordination; I find my self during the day doing stuff like updating the Microsoft Project plan, smoke testing, running between other teams we depend on to get their deliverables; checking with the User Experience team if they have the designs ready, checking with the Architecture team if they will pass by to set the folders structure for us…etc. All this leaves me no time to see code.\nIs this right? Should a Technical Team Leader do these stuff? If not, who should? Is it a Project Coordinator? what is exactly the job description for a Technical Team Leader?\nQuestions like these should be discussed with the Development Process people, but till then I will have to say: “that\u0026rsquo;s not right”.\nHow about you? what do you think?\n","permalink":"https://emadashi.com/2009/04/technical-team-leaderwho-is-not/","summary":"\u003cp\u003e\u003cimg alt=\"image originally on ccer\" loading=\"lazy\" src=\"/wp-content/uploads/2009/04/windowslivewritertechnicalteamleaderwhoisnot-d6d3manytasks-3.gif\"\u003e\u003c/p\u003e\n\u003cp\u003eWhen I started this blog my goal was to make it a technical one, in which most posts would have code, samples, screen shots, architecture…etc. This was the primary goal, though it is totally fine with me to talk about software life in general.\u003c/p\u003e\n\u003cp\u003eThe issue is that I get the ideas of my posts from my real daily life, which is mostly code challenges at work. I do write code in my leisure time, but for sure it is not as thorough as the thing at work.\u003cbr\u003e\nAnd since I haven\u0026rsquo;t posted any technical stuff lately…the simple conclusion is I DON\u0026rsquo;T SEE CODE ANYMORE!\u003c/p\u003e","title":"Technical Team Leader…Who Is Not"},{"content":" I just published episode 2 of the DotNetArabi podcast on www.dotnetarabi.com.\nThis episode was with guest Mohammad Salem, a distinguished community member who has 5 years of experience, we talked about the Enterprise Library in a catching discussion. I hope you enjoy it.\nعلى موقع www.dotnetarabi.com تجدون الحلقة الثانية من “دوت نت عربي”. موضوع الحلقة هو الـ”إنتربرايز لايبراري Enterprise Library”، و هي مجموعة من “البرامج المساعدة DLL” يستعملها المبرمجون بكثرة في المشاريع الكبيرة.\nكان ضيف الحلقة الزميل محمد سالم، و هو عضو نشط في مجتمع مطروي الـ”دوت نت” في الأردن Jordev. ","permalink":"https://emadashi.com/2009/04/dotnetarabi-episode-2-%D8%AF%D9%88%D8%AA-%D9%86%D8%AA-%D8%B9%D8%B1%D8%A8%D9%8A-%D8%A7%D9%84%D8%AD%D9%84%D9%82%D8%A9-%D8%A7%D9%84%D8%AB%D8%A7%D9%86%D9%8A%D8%A9/","summary":"\u003cp\u003e\u003cimg loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-263\" title=\"دوت نت عربي\" src=\"/wp-content/uploads/2009/04/dotnetarabi_1.jpg\" alt=\"دوت نت عربي\" width=\"196\" height=\"63\" /\u003e \u003cimg loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-262\" title=\"DotNetArabi\" src=\"/wp-content/uploads/2009/04/dotnetarabi_2.jpg\" alt=\"DotNetArabi\" width=\"183\" height=\"63\" /\u003e\u003c/p\u003e\n\u003cp\u003eI just published episode 2 of the DotNetArabi podcast on \u003ca href=\"http://www.dotnetarabi.com\"\u003ewww.dotnetarabi.com\u003c/a\u003e.\u003c/p\u003e\n\u003cp\u003eThis episode was with guest Mohammad Salem, a distinguished community member who has 5 years of experience, we talked about the Enterprise Library in a catching discussion. I hope you enjoy it.\u003c/p\u003e\n\u003cp style=\"direction:rtl\"\u003e\n  على موقع \u003ca href=\"http://www.dotnetarabi.com\"\u003ewww.dotnetarabi.com\u003c/a\u003e تجدون الحلقة الثانية من “دوت نت عربي”. موضوع الحلقة هو الـ”إنتربرايز لايبراري Enterprise Library”، و هي مجموعة من “البرامج المساعدة DLL” يستعملها المبرمجون بكثرة في المشاريع الكبيرة.\u003cbr /\u003e كان ضيف الحلقة الزميل محمد سالم، و هو عضو نشط في مجتمع مطروي الـ”دوت نت” في الأردن Jordev.\n\u003c/p\u003e","title":"DotNetArabi Episode 2 دوت نت عربي الحلقة الثانية"},{"content":"Finally, here I am declaring the technical Arabic talk show www.dotnetarabi.com. I didn\u0026rsquo;t realize it will take such effort, although it was the website thing more than anything else, WE SHOUD PAY DESIGNERS EVEN MORE!\nDotNetArabi is a talk show about technology in general and about .net in specific, held in Arabic language with me interviewing tech specialists.\nأخيرا، ها أنا أعلن عن تدشين “دوت نت عربي” www.dotnetarabi.com ، برنامج إذاعي يتكلم عن التكنولوجيا بشكل عام، و عن تكنولوجيا الـ .net بشكل خاص أقابل فيه تقنيين مختصين.\nاستغرقني العمل على هذا الموقع الكثير من الوقت يعود معظمها للعمل على شكل الموقع، النتيجة كانت زيادة احترامي لجماعة المصممين، كان عملا مضنياً!آمل أن ينال إعجاب الجميع. ","permalink":"https://emadashi.com/2009/03/dotnetarabi-%D8%AF%D9%88%D8%AA-%D9%86%D8%AA-%D8%B9%D8%B1%D8%A8%D9%8A/","summary":"\u003cp\u003eFinally, here I am declaring the technical Arabic talk show \u003ca href=\"http://www.dotnetarabi.com\"\u003ewww.dotnetarabi.com\u003c/a\u003e. I didn\u0026rsquo;t realize it will take such effort, although it was the website thing more than anything else, WE SHOUD PAY DESIGNERS EVEN MORE!\u003c/p\u003e\n\u003cp\u003eDotNetArabi is a talk show about technology in general and about .net in specific, held in Arabic language with me interviewing tech specialists.\u003c/p\u003e\n\u003cp style=\"direction: rtl\"\u003e\n  أخيرا، ها أنا أعلن عن تدشين “دوت نت عربي” \u003ca href=\"http://www.dotnetarabi.com\"\u003ewww.dotnetarabi.com\u003c/a\u003e ، برنامج إذاعي يتكلم عن التكنولوجيا بشكل عام، و عن تكنولوجيا الـ .net بشكل خاص أقابل فيه تقنيين مختصين.\u003cbr /\u003eاستغرقني العمل على هذا الموقع الكثير من الوقت يعود معظمها للعمل على شكل الموقع، النتيجة كانت زيادة احترامي لجماعة المصممين، كان عملا مضنياً!آمل أن ينال إعجاب الجميع.\n\u003c/p\u003e","title":"DotNetArabi دوت نت عربي"},{"content":"“Oh no, I won\u0026rsquo;t go into that code; I am not that intelligent!”\n“oh no, I don\u0026rsquo;t want to try this software…I don\u0026rsquo;t know what it will do to my machine!”\n“Oh no, I can\u0026rsquo;t write such a unique blog post!”\n“Oh no, I will not twiply to that celebrity…come on…he is a celebrity!”\nThese phrases kept chasing me for a long while in my life, and sometimes still does. It had the worst effect on my progress, I couldn\u0026rsquo;t move an inch forward; by a deep feeling I didn\u0026rsquo;t confront, I was afraid of failure, mixed with a feeling of negative humbleness.\nBut that was it, I couldn\u0026rsquo;t stay as a prisoner to these chains, and leave these cookies of success to people who might have less resources and powers.\nThen, after realizing this fact and working against it, I am free! within months I have created this blog you are reading, started the open source project Bunian (small but learned a lot from it and in progress), delivered session in JorDev (and still contributing effectively), and preparing a new technical Arabic podcast (to be announced soon).\nwhat helped me to do that:\nMake backup plans for everything you have paranoia about; backup your drive, use virtual machines, make a dummy blog…etc. This way you will not fear the change, the change which will possibly be the next big thing for you Don\u0026rsquo;t take it too serious; be cool about it, it\u0026rsquo;s not going to be the end of the world if it fails. Of course try your best and plan well, but beyond that you only have to take the step and try things out Aim high…but lower your expectations; the higher your expectations are, the more difficult accepting failure is, hence you will not try it out. so lower your expectations and prepare for the failure Try to find more reasons to do it, reasons that will only force you do well without the fear of failure. Joy is an example; I like writing and expressing my feelings/experience in words, so no matter how many subscribers there are, I keep posting to this blog (and no, I am not going to tell you how many, at least not right now :P) Think of all the great stuff you are going to miss because you fear loosing part of what you already have, and sometimes even less. What you are missing could be awesome! and this is not gambling, because you already control the bigger part of it, luck is only a part. Have confidence in your self, because you CAN be better, and the only ones who can\u0026rsquo;t get better are the ones who DON\u0026rsquo;T WANT to get better; that is the false modesty. People grow within the limits around them, widen the limits…and see how you will, automatically, grow to fill the space further Don\u0026rsquo;t be hasty, and grow larger bit by bit…one success leads to another. These are the things I could think of when it comes to it, I still struggle; it\u0026rsquo;s a never ending battle with my self, but I hopefully I will not surrender, and I hope this will help others as well.\nFinally, we are nothing and can achieve nothing without the help of God; do your best, then ask him for success, that\u0026rsquo;s the best prescription ever.\n","permalink":"https://emadashi.com/2009/03/fear-and-humblenessobstacles-in-the-way-of-success/","summary":"\u003cp\u003e“Oh no, I won\u0026rsquo;t go into that code; I am not that intelligent!”\u003cbr\u003e\n“oh no, I don\u0026rsquo;t want to try this software…I don\u0026rsquo;t know what it will do to my machine!”\u003cbr\u003e\n“Oh no, I can\u0026rsquo;t write such a unique blog post!”\u003cbr\u003e\n“Oh no, I will not twiply to that celebrity…come on…he is a celebrity!”\u003c/p\u003e\n\u003cp\u003eThese phrases kept chasing me for a long while in my life, and sometimes still does. It had the worst effect on my progress, I couldn\u0026rsquo;t move an inch forward; by a deep feeling I didn\u0026rsquo;t confront, I was afraid of failure, mixed with a feeling of negative humbleness.\u003cbr\u003e\nBut that was it, I couldn\u0026rsquo;t stay as a prisoner to these chains, and leave these cookies of success to people who might have less resources and powers.\u003c/p\u003e","title":"Fear and Humbleness…Obstacles in The Way of Success"},{"content":"“is Code Convention important?”, I couldn\u0026rsquo;t find better time to answer this with a big, decorated, shiny, flashing “YES” more than now!\nI was doing some coding with JavaScript in which I needed to create a Date object and add to it 30 days, simple job! So I did the following:\nvar x = new Date(); x.setFullYear(2009, 3, 12);//Create date 12th of March, 2009 x.setDate(x.getDate() + 30); document.writeln(x); Great, when I checked the result it was: “Tue May 12 … 2009“! OMG why May?!, where did the additional month come from?! if I am in 12th of March and I add 30 days I expect it to be 11th of April, what is going on?!\nGod knows how much time I spent checking that cheesy 3rd line in my code, what could be wrong in it? maybe the “getDate()” doesn\u0026rsquo;t really return the proper type needed to set a new date? I tried all various ways doing it, checking many “solutions” scattered all over the web.\n[Give your self sometime to figure it out before continue reading].\nWell, the problem actually wasn\u0026rsquo;t in the 3rd line at all, it was in the 2nd! see that 2nd parameter with the value “3”? it is 0-based numeric! why on earth would it be 0-based?! any sane developer who never knew this fact would instantly deal with it “3 as March”.\nCode Convention is as important as documentation; if I need documentation to know how to deal with piece of code and save me time to figure it out, Code Convention is as important.\n","permalink":"https://emadashi.com/2009/02/javascript-datetime-and-code-convention/","summary":"\u003cp\u003e“is Code Convention important?”, I couldn\u0026rsquo;t find better time to answer this with a big, decorated, shiny, flashing “YES” more than now!\u003c/p\u003e\n\u003cp\u003eI was doing some coding with JavaScript in which I needed to create a Date object and add to it 30 days, simple job! So I did the following:\u003c/p\u003e\n\u003c!--\n{\\rtf1\\ansi\\ansicpg\\lang1024\\noproof1256\\uc1 \\deff0{\\fonttbl{\\f0\\fnil\\fcharset178\\fprq1 Courier New;}}{\\colortbl;??\\red0\\green0\\blue255;\\red242\\green235\\blue227;\\red0\\green0\\blue0;\\red0\\green128\\blue0;}??\\fs20 \\cf1\\cb2\\highlight2 var\\cf0  x = \\cf1 new\\cf0  Date();\\par ??    x.setFullYear(2009, 3, 12);\\cf4 //Create date 12th of March, 2009\\par ??\\cf0     x.setDate(x.getDate() + 30);\\par ??    document.writeln(x);}\n--\u003e\n\u003cdiv style=\"font-size: 10pt; background: #f2ebe3; color: black; font-family: courier new\"\u003e\n  \u003cp style=\"margin: 0px\"\u003e\n    \u003cspan style=\"color: blue\"\u003e    var\u003c/span\u003e x = \u003cspan style=\"color: blue\"\u003enew\u003c/span\u003e Date();\n  \u003c/p\u003e","title":"JavaScript Date Object and Code Convention"},{"content":"In Bunian we needed to use a static constructor for some reason, it was all going good; we tested the code and it ran smoothly…excellent (Code Coverage anyone?!).\nBut when I came across this situation, it appeared that the static constructor wasn\u0026rsquo;t invoked!even when “Class.Method();” is called! so lets examine it.\nI have two simple classes as an Example:\npublic class Parent { public static string DoSomething() { return “Parent: DoSomething() called”; } } public class Child : Parent { static Child() { Console.WriteLine(“Child Static constructor called”); } public static string DoSomethingDifferent() { return “DoSomethingDifferent() called”; } } As it may be obvious, Child inherits from Parent, Child has a static constructor that we need to be executed when ever a method is invoked by Child. Now lets check the main program executing these two lines:\nConsole.WriteLine(Child.DoSomething()); //This code will NOT invoke the static constructor Console.WriteLine(Child.DoSomethingDifferent());//This code WILL invoke the static constructor The surprise (at least to me) when calling “Child.DoSomething()” the static constructor isn\u0026rsquo;t invoked! because it is in the parent!! aaaaaah! bad!! that was serious for our architecture and we had to do lots of fixes to turns things around the right way (which I think it was for our own good for other reasons :P)\nThis brings up the Code Coverage topic as well; in our case that static constructor\u0026rsquo;s job was to create an instance of a member that is only needed once, and we check on it in other times by “if _instance != null”. It always ran ok because all the test code we created used to call an original Child before calling any other method that resided in the Parent.\nbottom line: be ware of static constructors, and check your test code…it maybe hiding “surprises” for you 😉\n","permalink":"https://emadashi.com/2009/02/be-ware-of-static-constructors/","summary":"\u003cp\u003eIn \u003ca href=\"http://www.codeplex.com/bunian\"\u003eBunian\u003c/a\u003e we needed to use a static constructor for some reason, it was all going good; we tested the code and it ran smoothly…excellent (\u003ca href=\"http://en.wikipedia.org/wiki/Code_coverage\"\u003eCode Coverage\u003c/a\u003e anyone?!).\u003cbr\u003e\nBut when I came across this situation, it appeared that the static constructor wasn\u0026rsquo;t invoked!even when “Class.Method();” is called! so lets examine it.\u003c/p\u003e\n\u003cp\u003eI have two simple classes as an Example:\u003c/p\u003e\n\u003cdiv style=\"font-size:10pt;background:#f2ebe3;color:black;font-family:courier new;\"\u003e\n  \u003cp style=\"margin:0;\"\u003e\n    \u003cspan style=\"color:blue;\"\u003epublic\u003c/span\u003e \u003cspan style=\"color:blue;\"\u003eclass\u003c/span\u003e \u003cspan style=\"color:#2b91af;\"\u003eParent\u003c/span\u003e\n  \u003c/p\u003e\n  \u003cp style=\"margin:0;\"\u003e\n    {\n  \u003c/p\u003e\n  \u003cp style=\"margin:0;\"\u003e\n        \u003cspan style=\"color:blue;\"\u003epublic\u003c/span\u003e \u003cspan style=\"color:blue;\"\u003estatic\u003c/span\u003e \u003cspan style=\"color:blue;\"\u003estring\u003c/span\u003e DoSomething()\n  \u003c/p\u003e\n  \u003cp style=\"margin:0;\"\u003e\n        {\n  \u003c/p\u003e\n  \u003cp style=\"margin:0;\"\u003e\n            \u003cspan style=\"color:blue;\"\u003ereturn\u003c/span\u003e \u003cspan style=\"color:#a31515;\"\u003e“Parent: DoSomething() called”\u003c/span\u003e;\n  \u003c/p\u003e\n  \u003cp style=\"margin:0;\"\u003e\n        }\n  \u003c/p\u003e\n  \u003cp style=\"margin:0;\"\u003e\n    }\n  \u003c/p\u003e\n\u003c/div\u003e\n\u003cdiv style=\"font-size:10pt;background:#f2ebe3;color:black;font-family:courier new;\"\u003e\n  \u003cp style=\"margin:0;\"\u003e\n    \u003cspan style=\"color:blue;\"\u003epublic\u003c/span\u003e \u003cspan style=\"color:blue;\"\u003eclass\u003c/span\u003e \u003cspan style=\"color:#2b91af;\"\u003eChild\u003c/span\u003e : Parent\n  \u003c/p\u003e\n  \u003cp style=\"margin:0;\"\u003e\n    {\n  \u003c/p\u003e","title":"Beware of Static Constructors"},{"content":"Every ASP.NET developer should already know about the Membership Provider that ships with ASP.NET 2.0. Configuring it is as easy as opening Visual Studio \u0026gt; select the Web project file \u0026gt; navigate to the Project menu item \u0026gt; and select “ASP.NET Configuration”. Follow the wizard and you are up and running now.\nBut the problem with this approach is that it will build it\u0026rsquo;s OWN database in the App_Data folder and create the required tables there. Wouldn\u0026rsquo;t most of us have their own databases to work with? ok then, if you want the defualt ASP.NET Membership Provide (AspNetSqlMembershipProvider) to work on YOUR database do the following:\nNavigate to the folder: \u0026ldquo;C:\\Windows\\Microsoft.NET\\Framework\\v2.0.50727\u0026rdquo; and run \u0026ldquo;aspnet_regsql.exe\u0026rdquo;. Follow the wizard (it\u0026rsquo;s pretty easy, see the images below).\nThis step will create the Membership and Profile Provider tables necessary; if you are lucky you will see many dbo.aspnet__something_ tables.\nNow we need to tell the website which Provider it should use for this functionality, and to which database it should connect. The default configuration information that drives the default behavior of the default Provider resides in Machine.config (C:\\Windows\\Microsoft.NET\\Framework\\v2.0.50727\\CONFIG), which explains why you can\u0026rsquo;t find the configuration information in your web.config even after using the ASP.NET Configuration mini-website.\nThe best thing to do is to copy that configuration information from Machine.config to your website web.config in order to override its behavior to the desired one. For more information about configuration files and configuration hierarchy, read this.\n\u0026lt;membership defaultProvider=\u0026#34;AspNetSqlMembershipProvider\u0026#34;\u0026gt; \u0026lt;providers\u0026gt; \u0026lt;clear /\u0026gt; \u0026lt;add name=\u0026#34;AspNetSqlMembershipProvider\u0026#34; type=\u0026#34;System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a\u0026#34; connectionStringName=\u0026#34;BunianConnectionString\u0026#34; enablePasswordRetrieval=\u0026#34;false\u0026#34; enablePasswordReset=\u0026#34;true\u0026#34; requiresQuestionAndAnswer=\u0026#34;true\u0026#34; applicationName=\u0026#34;/\u0026#34; requiresUniqueEmail=\u0026#34;false\u0026#34; passwordFormat=\u0026#34;Hashed\u0026#34; maxInvalidPasswordAttempts=\u0026#34;5\u0026#34; minRequiredPasswordLength=\u0026#34;7\u0026#34; minRequiredNonalphanumericCharacters=\u0026#34;1\u0026#34; passwordAttemptWindow=\u0026#34;10\u0026#34; passwordStrengthRegularExpression=\u0026#34;\u0026#34; /\u0026gt; \u0026lt;/providers\u0026gt; \u0026lt;/membership\u0026gt; Note the highlighted changes:\nClear any previous configuration of AspNetSqlMembershipProvider from Machine.config; otherwise, you will get an \u0026ldquo;already configured\u0026rdquo; error. Change the connection string name to the one your application uses to connect to your database. This way you will have the default Membership Provider running on your database for your website; if you use the mini-site for the ASP.NET Configuration now and create new users, you will find them created in your database.\nNote that some resources say that you can change the database from the ASP.NET Configuration but I couldn\u0026rsquo;t find it there.\nDisclaimer: use the above on your own responsibility 🙂\n","permalink":"https://emadashi.com/2009/01/default-aspnet-membership-provider-on-different-database/","summary":"\u003cp\u003eEvery ASP.NET developer should already know about the \u003ca href=\"http://msdn.microsoft.com/en-us/library/yh26yfzy.aspx\"\u003eMembership Provider\u003c/a\u003e that ships with ASP.NET 2.0. Configuring it is as easy as opening Visual Studio \u0026gt; select the Web project file \u0026gt; navigate to the \u003cem\u003eProject\u003c/em\u003e menu item \u0026gt; and select “\u003cem\u003eASP.NET Configuration”.\u003c/em\u003e Follow the wizard and you are up and running now.\u003c/p\u003e\n\u003cp\u003eBut the problem with this approach is that it will build it\u0026rsquo;s OWN database in the App_Data folder and create the required tables there. Wouldn\u0026rsquo;t most of us have their own databases to work with? ok then, if you want the \u003cstrong\u003edefualt\u003c/strong\u003e ASP.NET Membership Provide (AspNetSqlMembershipProvider) to work on \u003cstrong\u003eYOUR\u003c/strong\u003e database do the following:\u003c/p\u003e","title":"default ASP.NET Membership provider on different database"},{"content":"When we started gathering requirements from the charity organizations for Bunian, it appeared that there are other kinds of people who benefit from the charity organization; there are “needy families” whose father is still alive but can\u0026rsquo;t sustain their families, and “students” who can\u0026rsquo;t afford their study. So Bunian needs to support all these Beneficiaries in smart way; we solved the problem by creating the IBeneficiary interface. But the problem is that in order to get out with the best solution ever (damn perfectionism!), we kept coming up with different solutions, and overriding them with other solutions every once in a while, and this kept going like forever!\nThough we agreed from the beginning that we shall keep it as simple as possible and then add up to it as we get out with the first phase, yet it kept sliding “ok only we have to do this, oh and that too”. Until one day I thought I came up with the silver bullet everyone talks about , and sent an email to the group about the changes I wanted to make, when a colleague caught me online and showed her objection about the new solutions, and proposed another. Only then I woke up!! “OMG…WE ARE STILL HERE!!”\nInstantly, I remembered my oldest brothers comment (Mohammad, very wise brother) about Bunian “It\u0026rsquo;s great that you want to build the greatest architecture ever, but remember that Orphans are waiting!!”\nSo LET\u0026rsquo;S JUST GET ON WITH IT!! ship it!! do it!! let version one come out, let “customers” benefit from it, then you take your time doing your silver bullet. So this is one of the challenges facing the Project Managers, something we developers rarely think about :); today…I learned my lesson!\n","permalink":"https://emadashi.com/2009/01/get-on-with-it/","summary":"\u003cp\u003e\u003ca href=\"http://eashi.files.wordpress.com/2009/01/clock.jpg\"\u003e\u003cimg loading=\"lazy\" decoding=\"async\" style=\"border-width:0;\" src=\"https://eashi.files.wordpress.com/2009/01/clock-thumb.jpg\" border=\"0\" alt=\"clock\" width=\"150\" height=\"146\" align=\"right\" /\u003e\u003c/a\u003eWhen we started gathering requirements from the charity organizations for \u003ca href=\"http://www.codeplex.com/bunian\"\u003eBunian\u003c/a\u003e, it appeared that there are other kinds of people who benefit from the charity organization; there are “needy families” whose father is still alive but can\u0026rsquo;t sustain their families, and “students” who can\u0026rsquo;t afford their study. \u003c/p\u003e\n\u003cp\u003eSo Bunian needs to support all these Beneficiaries in smart way; we solved the problem by creating the IBeneficiary interface. But the problem is that in order to get out with the best solution ever (damn perfectionism!), we kept coming up with different solutions, and overriding them with other solutions every once in a while, and this kept going like forever!\u003c/p\u003e","title":"Get On With It!"},{"content":"Update: death toll rate reaches 470 and 2400 injuries, and I will stop counting.\nAfter a 20 months siege during which there was no water, food, medicine, gas, oil, and electricity…today Israel thinks that\u0026rsquo;s not enough…and starts a massacre; 160 dead, 200 wounded by 40 rockets hit Gaza and still going.\nPhotos From the Massacre Taking Place Today English news: here\nArabic news: here\nPhotos From the Siege English news: here\nArabic news: here, and here\nsmuggling food through the tunnels\nMilk for the small children who lack the basic ingredients for healthy food, finds its only way trough tunnels under ground.\nno electricity, you know what this affects; imagine yourself without electricity for 1 week, not saying 20 months!\n","permalink":"https://emadashi.com/2008/12/gaza-starvation-for-18-months-and-a-massacre-today/","summary":"\u003cp\u003e\u003cspan style=\"color:#ff0000;\"\u003eUpdate\u003c/span\u003e: death toll rate reaches 470 and 2400 injuries, and I will stop counting.\u003c/p\u003e\n\u003cp\u003eAfter a 20 months siege during which there was no water, food, medicine, gas, oil, and electricity…today Israel thinks that\u0026rsquo;s not enough…and starts a massacre; 160 dead, 200 wounded by 40 rockets hit Gaza and still going.\u003c/p\u003e\n\u003ch2 id=\"photos-from-the-massacre-taking-place-today\"\u003ePhotos From the Massacre Taking Place Today\u003c/h2\u003e\n\u003cp\u003eEnglish news: \u003ca href=\"http://www.islamonline.com/news/newsfull.php?newid=197928\" title=\"http://www.islamonline.com/news/newsfull.php?newid=197993\"\u003ehere\u003c/a\u003e\u003cbr\u003e\nArabic news: \u003ca href=\"http://www.aljazeera.net/NR/exeres/75C5FBBA-6F81-4770-8985-47169CE608C7.htm\"\u003ehere\u003c/a\u003e\u003c/p\u003e\n\u003cp\u003e\u003ca href=\"http://www.aljazeera.net/NR/exeres/75C5FBBA-6F81-4770-8985-47169CE608C7.htm\"\u003e\u003cimg loading=\"lazy\" decoding=\"async\" style=\"border-width:0;\" src=\"https://eashi.files.wordpress.com/2008/12/2008122711545599734-2.jpg\" border=\"0\" alt=\"2008122711545599734_2\" width=\"371\" height=\"254\" /\u003e\u003c/a\u003e\u003c/p\u003e\n\u003cp\u003e\u003ca href=\"http://www.aljazeera.net/NR/exeres/75C5FBBA-6F81-4770-8985-47169CE608C7.htm\"\u003e\u003cimg loading=\"lazy\" decoding=\"async\" style=\"border-width:0;\" src=\"https://eashi.files.wordpress.com/2008/12/1-880821-1-34.jpg\" border=\"0\" alt=\"1_880821_1_34\" width=\"375\" height=\"303\" /\u003e\u003c/a\u003e\u003c/p\u003e\n\u003cp\u003e\u003ca href=\"http://www.aljazeera.net/NR/exeres/75C5FBBA-6F81-4770-8985-47169CE608C7.htm\"\u003e\u003cimg loading=\"lazy\" decoding=\"async\" style=\"border-width:0;\" src=\"https://eashi.files.wordpress.com/2008/12/1-880850-1-34.jpg\" border=\"0\" alt=\"1_880850_1_34\" width=\"378\" height=\"305\" /\u003e\u003c/a\u003e\u003c/p\u003e\n\u003ch2 id=\"photos-from-the-siege\"\u003ePhotos From the Siege\u003c/h2\u003e\n\u003cp\u003eEnglish news: \u003ca href=\"http://www.freegaza.org/\"\u003ehere\u003c/a\u003e\u003cbr\u003e\nArabic news: \u003ca href=\"http://www.aljazeera.net/News/Templates/Postings/DetailedPage.aspx?FRAMELESS=false\u0026amp;NRNODEGUID=%7BDA9B962B-1EFB-4BEB-91C1-B0A367FD5A67%7D\u0026amp;NRORIGINALURL=%2FNR%2Fexeres%2FDA9B962B-1EFB-4BEB-91C1-B0A367FD5A67.htm\u0026amp;NRCACHEHINT=Guest\"\u003ehere\u003c/a\u003e, and \u003ca href=\"http://www.aljazeera.net/NR/exeres/B2BD0D99-B1E3-4BE3-BE11-7D08EA5414FC.htm\"\u003ehere\u003c/a\u003e\u003c/p\u003e","title":"Gaza, Starvation For 18 Months And a Massacre Today!"},{"content":" Lately we have decided in Bunian to move on to NHibernate 2.0, and the contributor assigned to the move started out, only to send an email one day after: “THERE IS NO DOCUMENTATION!\u0026rsquo;.\nWe had errors as a result to the move which couldn\u0026rsquo;t be fixed without a documentation explaining why this happened.\nAfter searching for a while, we found two resources of the new documentation:\na wiki help that is hosted on Google Knol:\nhttp://knol.google.com/k/fabio-maulo/-/1nr4enxv3dpeq/21#\nNot really appealing to be used extensively; no smooth flow between chapters, frames dazzle the eyes, no table of contents, but surely a great step forward for a documentation that is maintained by the community\nand online ordinary documentation as HTML:\nhttp://www.nhforge.org/doc/nh/en/index.html\nwhich is my preferred way for documentation (or at least until the wiki proves its usability) Neither links were included anywhere in the NHibernate zipped file. I didn\u0026rsquo;t realize how important a documentation is until it stopped us from moving on in our project; Only after we made sure that the documentation is available we decided to move on to version 2.0. The lesson to be learned is that if you are an enthusiast developer and want to add another piece of code to the world, keep in mind that your project is not only code; it is people, resources, community, ease of use, documentation, and any other simple thing that people need while you think it\u0026rsquo;s not important.\nOf course I couldn\u0026rsquo;t find developers or contributors to open source projects greater than the NHibernate team, having such a project in the first place is awesome, and I thank each and everyone of them. I hope one day I can really contribute back to NHibernate. Thanks again guys.\n","permalink":"https://emadashi.com/2008/12/importance-of-documentation/","summary":"\u003cp\u003e \u003c/p\u003e\n\u003cp\u003e\u003ca href=\"http://eashi.files.wordpress.com/2008/12/documentation.jpg\"\u003e\u003cimg loading=\"lazy\" decoding=\"async\" style=\"border-width:0;\" height=\"251\" alt=\"documentation\" src=\"https://eashi.files.wordpress.com/2008/12/documentation-thumb.jpg\" width=\"174\" align=\"right\" border=\"0\" /\u003e\u003c/a\u003e\u003c/p\u003e\n\u003cp\u003eLately we have decided in \u003ca href=\"http://www.codeplex.com/bunian\"\u003eBunian\u003c/a\u003e to move on to NHibernate 2.0, and the contributor assigned to the move started out, only to send an email one day after: “THERE IS NO DOCUMENTATION!\u0026rsquo;.\u003cbr\u003e\nWe had errors as a result to the move which couldn\u0026rsquo;t be fixed without a documentation explaining why this happened.\u003c/p\u003e\n\u003cp\u003eAfter searching for a while, we found two resources of the new documentation:\u003c/p\u003e\n\u003cul\u003e\n\u003cli\u003e\n\u003cp\u003ea wiki help that is hosted on \u003ca href=\"http://knol.google.com/\"\u003eGoogle Knol\u003c/a\u003e:\u003cbr\u003e\n\u003ca href=\"http://knol.google.com/k/fabio-maulo/-/1nr4enxv3dpeq/21\" title=\"http://knol.google.com/k/fabio-maulo/-/1nr4enxv3dpeq/21#\"\u003ehttp://knol.google.com/k/fabio-maulo/-/1nr4enxv3dpeq/21#\u003c/a\u003e\u003cbr\u003e\nNot really appealing to be used extensively; no smooth flow between chapters, frames dazzle the eyes, no table of contents, but surely a great step forward for a documentation that is maintained by the community\u003c/p\u003e","title":"Importance of Documentation"},{"content":"The other day I was putting the last touch of a temporary way to manage the NHibernate session (ISession) in Bunian. So part of the task was to bind a method to the HttpApplication EndRequest event (in the Global.asax.cs file) like the following:\npublic override void Init() { this.EndRequest += WorkContext.NHibernateSessionManager.Instance.HttpRequestEnded; } By doing this, at the end of each page request the NHibernateSessionManager.Instance.HttpRequestEnded() will be called and I can clean the session then. But to my surprise this method was called at least 10 times!! So I thought maybe the Global.Init() method is called many times for some reason and I ended up binding the same method to the EndRequest event many times, so I set a breakpoint at the Global.Init() method and…it\u0026rsquo;s called one time only.\nThat was strange, ok so it\u0026rsquo;s only the HttpRequestEnded() mehtod that is called many times, but I am requesting only one page!! how come there are 10 requests!\nSo I opened Firefox which is already “armed” with the magnificent add-on Firebug, and I requested the page again, Firebug showed the following:\nAnd that was it!! the page contained 10 resources (1 CSS file and 9 images), OH! so it is one page, but for each resource referenced on the page you get a request, hence a raise of the EndRequest event.\nI couldn\u0026rsquo;t love Firebug more; I am not only happy that I wasn\u0026rsquo;t doing something wrong, but yet I learned something new about the ASP.NET internals. awesome.\n","permalink":"https://emadashi.com/2008/12/httpapplication-endrequest-event-invoked-many-times-in-single-request/","summary":"\u003cp\u003eThe other day I was putting the last touch of a temporary way to manage the NHibernate session (ISession) in \u003ca href=\"http://www.codeplex.com/bunian\"\u003eBunian\u003c/a\u003e. So part of the task was to bind a method to the HttpApplication EndRequest event (in the Global.asax.cs file) like the following:\u003c/p\u003e\n\u003cdiv style=\"font-size:12pt;background:#f2ebe3;color:black;font-family:courier new;\"\u003e\n  \u003cp style=\"margin:0;\"\u003e\n    \u003cspan style=\"color:blue;\"\u003epublic\u003c/span\u003e \u003cspan style=\"color:blue;\"\u003eoverride\u003c/span\u003e \u003cspan style=\"color:blue;\"\u003evoid\u003c/span\u003e Init()\n  \u003c/p\u003e\n  \u003cp style=\"margin:0;\"\u003e\n    {\n  \u003c/p\u003e\n  \u003cp style=\"margin:0;\"\u003e\n           \u003cspan style=\"color:blue;\"\u003ethis\u003c/span\u003e.EndRequest += WorkContext.\u003cspan style=\"color:#2b91af;\"\u003eNHibernateSessionManager\u003c/span\u003e.Instance.HttpRequestEnded;\n  \u003c/p\u003e\n  \u003cp style=\"margin:0;\"\u003e\n    }\n  \u003c/p\u003e\n\u003c/div\u003e\n\u003cp\u003eBy doing this, at the end of each page request the \u003cstrong\u003eNHibernateSessionManager.Instance.HttpRequestEnded()\u003c/strong\u003e will be called and I can clean the session then. But to my surprise this method was called at least 10 times!! So I thought maybe the \u003cstrong\u003eGlobal.Init()\u003c/strong\u003e method is called many times for some reason and I ended up binding the same method to the EndRequest event many times, so I set a breakpoint at the Global.Init() method and…it\u0026rsquo;s called one time only.\u003c/p\u003e","title":"HttpApplication EndRequest Event Invoked Many Times In Single Request?"},{"content":"I don\u0026rsquo;t know whether to thank or scold my good friend Omar Qadan for introducing me to Travian, a strategy game played online.\nIt\u0026rsquo;s amazing how a simple, web-based, HTML-front game can be so rich and vast entertainment-wise. It\u0026rsquo;s a real strategy game where you build villages, resources, armies, embassies, and conduct trading, diplomacy, wars, and alliances—all through simple images, numbers, and text.\nOn the other hand, I can\u0026rsquo;t ignore the programming part of the game (being a developer that is). It must be big, fun, and tiring; think of all these rules and the simulation algorithms the game is built upon, the server handling thousands of players, and scripts (yes, lots of hacks! 😄). Even the hacking idea itself is so delicious (programming-wise only 😄), a true heaven for developers. Also, the makers of the game are on the right track of providing developers points through which they can access the game and display information on other sites or applications. For now, it\u0026rsquo;s only exporting database tables of statistical information about the game status, but still I consider it a cool step toward supplying nice endpoints for developers, maybe Web Services in the future.\nEvery time a new idea hits the web, I say, “Okay, that\u0026rsquo;s it…there are no more ideas!”, and every time I say that I am proved to be wrong: YouTube, Facebook, Wikipedia, Delicious, Digg, SlideShare, Flickr…and the list goes on.\nSo this is a message for all of us: don\u0026rsquo;t limit your imagination; ideas never run out.\nThe only concern now is that I don\u0026rsquo;t want to be addicted, so let\u0026rsquo;s wish for the best…and be warned…because Rapacious is rising 😉\n","permalink":"https://emadashi.com/2008/12/travians-be-warnedrapacious-is-rising/","summary":"\u003cp\u003eI don\u0026rsquo;t know whether to thank or scold my good friend \u003ca href=\"http://www.jerashdev.net/blog/ara/\"\u003eOmar Qadan\u003c/a\u003e for introducing me to \u003ca href=\"http://www.travian.com/\"\u003eTravian\u003c/a\u003e, a strategy game played online.\u003c/p\u003e\n\u003cp\u003e\u003cimg alt=\"Travian screenshot\" loading=\"lazy\" src=\"https://eashi.files.wordpress.com/2008/12/travian4.jpg\"\u003e\u003c/p\u003e\n\u003cp\u003eIt\u0026rsquo;s amazing how a simple, web-based, HTML-front game can be so rich and vast entertainment-wise. It\u0026rsquo;s a real strategy game where you build villages, resources, armies, embassies, and conduct trading, diplomacy, wars, and alliances—all through simple images, numbers, and text.\u003c/p\u003e\n\u003cp\u003eOn the other hand, I can\u0026rsquo;t ignore the programming part of the game (being a developer that is). It must be big, fun, and tiring; think of all these rules and the simulation algorithms the game is built upon, the server handling thousands of players, and scripts (yes, lots of hacks! 😄). Even the hacking idea itself is so delicious (programming-wise only 😄), a true heaven for developers. Also, the makers of the game are on the right track of providing developers points through which they can access the game and display information on other sites or applications. For now, it\u0026rsquo;s only exporting database tables of statistical information about the game status, but still I consider it a cool step toward supplying nice endpoints for developers, maybe Web Services in the future.\u003c/p\u003e","title":"Travians be Warned…Rapacious is Rising"},{"content":"The feedback was very good, and I was glad that everybody liked it. Jordev is really moving ahead, and I am very excited being part of it 🙂\nBelow is the slide show (it\u0026rsquo;s an enhanced version from my previous one):\nIntroduction To NHibernate (SlideShare)\nCode is the same of the previous one which you can download from here\n","permalink":"https://emadashi.com/2008/12/introduction-to-nhibernate-session-at-jordev-was-good/","summary":"\u003cp\u003eThe feedback was very good, and I was glad that everybody liked it. Jordev is really moving ahead, and I am very excited being part of it 🙂\u003c/p\u003e\n\u003cp\u003eBelow is the slide show (it\u0026rsquo;s an enhanced version from my \u003ca href=\"http://eashi.wordpress.com/2008/07/02/my-introduction-to-nhibernate-presentation-and-slides/\"\u003eprevious one\u003c/a\u003e):\u003c/p\u003e\n\u003cp\u003e\u003ca href=\"https://www.slideshare.net/slideshow/introduction-to-nhibernate-presentation/821222\"\u003eIntroduction To NHibernate (SlideShare)\u003c/a\u003e\u003c/p\u003e\n\u003cp\u003eCode is the same of the previous one which you can download from \u003ca href=\"http://www.freedrive.com/file/395364,emadnhibernatepresentation.zip\"\u003ehere\u003c/a\u003e\u003c/p\u003e","title":"Introduction to NHibernate Session at Jordev Was Good"},{"content":" JorDev .net is a .NET user group founded by enthusiastic Jordanian IT professionals. On Wednesday, November 26, I will be doing my first session in a series about NHibernate.\nTalk Details Overview: NHibernate is an object-relational mapping (ORM) solution for the Microsoft .NET platform. It provides an easy-to-use framework for mapping an object-oriented domain model to a traditional relational database. Its purpose is to relieve the developer from a significant amount of relational data persistence-related programming tasks. NHibernate is free open source software distributed under the GNU Lesser General Public License. Target audience: .NET developers, software designers, software engineers, and software architects. Date: Wednesday, November 26, 2008. Location: MIC (Microsoft Innovation Center, Royal Scientific Society Building, 3rd Floor). Time: 6:30 pm to 8:30 pm (Amman, Jordan local time). For more info: Mohamed Saleh: 0788716457 Ayman Farouk: 0795727344 Reminders Live Calendar Facebook event Outlook Calendar Google Calendar ","permalink":"https://emadashi.com/2008/11/my-first-talk-at-jordev-net/","summary":"\u003cp\u003e\u003cimg alt=\"JorDev Logo\" loading=\"lazy\" src=\"http://eashi.files.wordpress.com/2008/11/jordevlogo.png\"\u003e\n\u003cimg alt=\"NHibernate Logo\" loading=\"lazy\" src=\"http://eashi.files.wordpress.com/2008/11/nhib-logo04.gif\"\u003e\u003c/p\u003e\n\u003cp\u003e\u003ca href=\"http://jordev.net/JordevCommunity/About.aspx\"\u003eJorDev .net\u003c/a\u003e is a .NET user group founded by enthusiastic Jordanian IT professionals. On Wednesday, November 26, I will be doing my first session in a series about NHibernate.\u003c/p\u003e\n\u003ch2 id=\"talk-details\"\u003eTalk Details\u003c/h2\u003e\n\u003cul\u003e\n\u003cli\u003eOverview: NHibernate is an object-relational mapping (ORM) solution for the Microsoft .NET platform. It provides an easy-to-use framework for mapping an object-oriented domain model to a traditional relational database. Its purpose is to relieve the developer from a significant amount of relational data persistence-related programming tasks. NHibernate is free open source software distributed under the GNU Lesser General Public License.\u003c/li\u003e\n\u003cli\u003eTarget audience: .NET developers, software designers, software engineers, and software architects.\u003c/li\u003e\n\u003cli\u003eDate: Wednesday, November 26, 2008.\u003c/li\u003e\n\u003cli\u003eLocation: MIC (Microsoft Innovation Center, Royal Scientific Society Building, 3rd Floor).\u003c/li\u003e\n\u003cli\u003eTime: 6:30 pm to 8:30 pm (Amman, Jordan local time).\u003c/li\u003e\n\u003cli\u003eFor more info:\n\u003cul\u003e\n\u003cli\u003eMohamed Saleh: 0788716457\u003c/li\u003e\n\u003cli\u003eAyman Farouk: 0795727344\u003c/li\u003e\n\u003c/ul\u003e\n\u003c/li\u003e\n\u003c/ul\u003e\n\u003ch2 id=\"reminders\"\u003eReminders\u003c/h2\u003e\n\u003cul\u003e\n\u003cli\u003e\u003ca href=\"http://calendar.live.com/calendar/calendar.aspx?rru=addevent\u0026amp;dtstart=20081126T163000Z\u0026amp;dtend=20081126T183000Z\u0026amp;summary=NHibernate\u0026#43;Data\u0026#43;Access\u0026#43;Technology\u0026#43;Session\u0026#43;%5b1%5d\u0026amp;location=Royal\u0026#43;Scientific\u0026#43;Society\u0026#43;Building%2c\u0026#43;3rd\u0026#43;Floor\u0026amp;description=NHibernate\u0026#43;is\u0026#43;an\u0026#43;Object-relational\u0026#43;mapping\u0026#43;%28ORM%29\u0026#43;solution\u0026#43;for\u0026#43;the\u0026#43;Microsoft\u0026#43;.NET\u0026#43;platform.\u0026#43;it\u0026#43;provides\u0026#43;an\u0026#43;easy\u0026#43;to\u0026#43;use\u0026#43;framework\u0026#43;for\u0026#43;mapping\u0026#43;an\u0026#43;object-oriented\u0026#43;domain\u0026#43;model\u0026#43;to\u0026#43;a\u0026#43;traditional\u0026#43;relational\u0026#43;database.\u0026#43;Its\u0026#43;purpose\u0026#43;is\u0026#43;to\u0026#43;relieve\u0026#43;the\u0026#43;developer\u0026#43;from\u0026#43;a\u0026#43;significant\u0026#43;amount\u0026#43;of\u0026#43;relational\u0026#43;data\u0026#43;persistence-related\u0026#43;programming\u0026#43;tasks.%0a...%0d%0a%0d%0ahttp%3a%2f%2fjordevnhibernate1.events.live.com%2f\"\u003eLive Calendar\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"http://www.facebook.com/event.php?eid=45818242564\"\u003eFacebook event\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"http://jordevnhibernate1.events.live.com/event.ics\"\u003eOutlook Calendar\u003c/a\u003e\u003c/li\u003e\n\u003cli\u003e\u003ca href=\"http://www.google.com/calendar/event?action=TEMPLATE\u0026amp;text=NHibernate\u0026#43;Data\u0026#43;Access\u0026#43;Technology\u0026#43;Session\u0026#43;%5b1%5d\u0026amp;dates=20081126T163000Z%2f20081126T183000Z\u0026amp;location=Royal\u0026#43;Scientific\u0026#43;Society\u0026#43;Building%2c\u0026#43;3rd\u0026#43;Floor\u0026amp;sprop=http%3a%2f%2fjordevnhibernate1.events.live.com%2f\u0026amp;details=NHibernate\u0026#43;is\u0026#43;an\u0026#43;Object-relational\u0026#43;mapping\u0026#43;%28ORM%29\u0026#43;solution\u0026#43;for\u0026#43;the\u0026#43;Microsoft\u0026#43;.NET\u0026#43;platform.\u0026#43;it\u0026#43;provides\u0026#43;an\u0026#43;easy\u0026#43;to\u0026#43;use\u0026#43;framework\u0026#43;for\u0026#43;mapping\u0026#43;an\u0026#43;object-oriented\u0026#43;domain\u0026#43;model\u0026#43;to\u0026#43;a\u0026#43;traditional\u0026#43;relational\u0026#43;database.\u0026#43;Its\u0026#43;purpose\u0026#43;is\u0026#43;to\u0026#43;relieve\u0026#43;the\u0026#43;developer\u0026#43;from\u0026#43;a\u0026#43;significant\u0026#43;amount\u0026#43;of\u0026#43;relational\u0026#43;data\u0026#43;persistence-related\u0026#43;programming\u0026#43;tasks.%0a...%0d%0a%0d%0ahttp%3a%2f%2fjordevnhibernate1.events.live.com%2f\"\u003eGoogle Calendar\u003c/a\u003e\u003c/li\u003e\n\u003c/ul\u003e","title":"My First Talk at JorDev .net"},{"content":"In a previous post I showed the general architecture of Bunian. I\u0026rsquo;d like, in this post, to touch on the Data Access part and how it interacts with the Business Objects.\nIn traditional architectures there are 3 known layers: Data Access, Business, and Presentation. DTO\u0026rsquo;s (Data Transfer Objects) are used to carry the data back and forth between the layers. Look to the following diagram:\nBunian contributors seemed to have the same experience developing against such architecture, so we have decided to go with something different; smart Business Objects with more toward OOP.\nThe way I\u0026rsquo;d present the current architecture is like the following:\nAs you can see from the diagram, the architecture revolves around one core unit, the Business Objects; because it\u0026rsquo;s the essence of the application, it\u0026rsquo;s where all the real things happen. Being the core, the interaction will happen in different ways depending on the nature of the service the component provides (or requires). Those can be divided into three categories:\nInteracting with components that provide services consumable by many other applications; like logging for example. Here our core can reference the component directly without any worries because the component is absolutely independent of the core (represented in the previous graph as solid arrow). Of course it would be better if there is simple abstraction layer so we can manage any change of components. Interacting with components that consume services from our core directly; like the User Interface. The interface will merely represent the business behavior in a way the end user will understand, no dependency what so ever from the core on the UI, it should be even representable through console application if needed (also represented in a solid arrow) Interacting with components that are providing a special need to the business, like the Data Access. This should be done via interfaces and Dependency Injection; that is because it is the business who determines the needs to be fulfilled, it is the one who states it needs to be able to Save, Delete, Update..etc.., and the component willing to fulfill this need should adhere to the contract the core dictates. (represented by the dotted line meaning indirect dependency) We are concentrating on the 3rd interaction, specifically the data access component.\nThe main thing to note here is that by using Interfaces and Dependency Injection, we will be eliminating any circular dependencies; even if the candidate component will require parts of the core (like our example: the data access will want to return strong types that reside in the business objects, or take types as parameters), even if that so, we will make sure that the core is independent of the component (references wise).\nThe best way to understand is by an example, I will try to make it as simple as possible first, and in future post I might include more real scenarios (like the one we are using in Bunian) so lets get our sleeves folded:\nwe have a simple class MyBusinessObject with a simple property DisplayName:\npublic class MyBusinessObject { private string _displayName; public string DisplayName { get { return _displayName; } set { _displayName = value; } } } This class needs to have a way to access the database and bring an instance, but on the other hand, it doesn\u0026rsquo;t want to do anything with the implementation. So it declares that it will need a component that should adhere to the IRepository interface which will have the Get method. It will have this component as a static member:\npublic static IRepository _repository; IRepository definition is:\npublic interface IRepository { MyBusinessObject Get(); } So a component volunteers, MyConcreteRepository:\nclass MyConcreteRepository : IRepository { public MyBusinessObject Get() { MyBusinessObject myObject = new MyBusinessObject(); myObject.DisplayName = \u0026#34;ConcreteRepository\u0026#34;; return myObject; } } Ok great, now all what we need is to assign an instance of this concrete class to the _repository static member in MyBusinessObject static constructor**.** but if we do so the following it will be wrong:\nstatic MyBusinessObject() { _repository = new MyConcreteRepository(); // wrong! } simply because if MyConcreteRepository resides in different project/dll (and mostly it will), then you will have circular dependency between the Business Objects and the Data Access. So the answer is to use reflection and get an instance of class without referring to dll. Using Windsor we will do the following:\nstatic MyBusinessObject() { IWindsorContainer container = new WindsorContainer(new XmlInterpreter(new ConfigResource(\u0026#34;castle\u0026#34;))); _repository = container.Resolve\u0026lt;IRepository\u0026gt;(\u0026#34;anotherConcrete.repository\u0026#34;); } The lines above, in the simplest explanation, will check in a configuration file, and see which class we will use to create instance of to assign a property of type IRepository. supplying the key \u0026ldquo;anotherConcrete.repository\u0026rdquo; tells Windsor which class to use. The config file is like the following:\n\u0026lt;castle\u0026gt; \u0026lt;components\u0026gt; \u0026lt;component id=\u0026#34;concrete.repository\u0026#34; service=\u0026#34;BusinessObjects.IRepository, BusinessObjects\u0026#34; type=\u0026#34;ConcreteRepository.MyConcreteRepository, ConcreteRepository\u0026#34; /\u0026gt; \u0026lt;component id=\u0026#34;anotherConcrete.repository\u0026#34; service=\u0026#34;BusinessObjects.IRepository, BusinessObjects\u0026#34; type=\u0026#34;AnotherConcreteRepository.MyOtherConcreteRepository, AnotherConcreteRepository\u0026#34; /\u0026gt; \u0026lt;/components\u0026gt; \u0026lt;/castle\u0026gt; By that we will have achieved our data access within our business objects without circular dependencies and in a way that will make it easy to change data access component with another in the future.\nOf course in real life you would use inheritance for example to manage similar code, this will be postponed in another post by god willing, hopefully soon.\nNote that we didn\u0026rsquo;t use essence of \u0026ldquo;dependency injection\u0026rdquo;, since it means more than the Resolve(key) part. For more information about dependency injection read this excellent series of articles here.\nSource code of the example above is available here.\n[digg=http://digg.com/programming/Data_Acces_within_Business_Objects]\n","permalink":"https://emadashi.com/2008/11/data-access-within-business-objects-bunian-design/","summary":"\u003cp\u003eIn a previous post I showed the general architecture of Bunian. I\u0026rsquo;d like, in this post, to touch on the Data Access part and how it interacts with the Business Objects.\u003c/p\u003e\n\u003cp\u003eIn traditional architectures there are 3 known layers: Data Access, Business, and Presentation. \u003ca href=\"http://en.wikipedia.org/wiki/Data_Transfer_Object\"\u003eDTO\u0026rsquo;s\u003c/a\u003e (Data Transfer Objects) are used to carry the data back and forth between the layers. Look to the following diagram:\u003c/p\u003e\n\u003cp\u003e\u003cimg alt=\"DTO\" loading=\"lazy\" src=\"http://eashi.files.wordpress.com/2008/11/dto.jpg\"\u003e\u003c/p\u003e\n\u003cp\u003eBunian contributors seemed to have the same experience developing against such architecture, so we have decided to go with something different; smart Business Objects with more toward OOP.\u003c/p\u003e","title":"Data Access Within Business Objects -Bunian Design-"},{"content":"\nIf you don\u0026rsquo;t know it:\nOnce upon a time there was a group of little frogs, who decided to go through a competition to climb a tower. The tower was high and difficult, and no one of the spectator frogs believed that any of the tiny frogs can make it to the top.\nLittle frogs started climbing, while spectators yelling:\n– \u0026ldquo;oh my, it\u0026rsquo;s too high…I don\u0026rsquo;t think they can make it!\u0026rdquo;\n– \u0026ldquo;they are too young, how possibly can they reach the top?! that\u0026rsquo;s insane\u0026rdquo;\n.\n.\nShouting and yelling continued, while the little frogs surrendering one by one, except for this one little frog who kept going and going, climbing up further and further more. Surprising everyone, that frog made it to the top and he won the race! well…the only reason for his success that…HE WAS DEAF, he simple couldn\u0026rsquo;t hear the negative shouting of the spectators!\n**1) The effort a man produces trying to succeed is proportional to the amount of expectation to succeed\n** 2) and the more effort he produces, the more it is possible he will succeed.\nSo if one member of a team starts putting the team down, the teams effort is absolutely going down, even if they can make it, they won\u0026rsquo;t. no passion, no effort, no success.\nThe only thing you will get from being around negative people is being pulled down with them; they will keep discouraging you, to give up, to stop you from reaching your goal! with all sort of discouraging words:\n– \u0026ldquo;the way we work is wrong, this is stupid! this is never gonna work\u0026rdquo;\n\u0026ldquo;I knew it! I knew it!\u0026rdquo; \u0026ldquo;the client is going to reject it, I am telling you! he is!\u0026rdquo; *with yellow smile*\nEnlarging the disadvantages of the surroundings, and forgetting about the advantages, putting the passion off. Yes, there are annoyances, but come on, NOTHING IS PERFECT! any sane human would obviously tell you that \u0026ldquo;not getting all\u0026rdquo; doesn\u0026rsquo;t mean \u0026ldquo;giving up on all\u0026rdquo;; if you do that, while there is nothing perfect, obviously, you will end up losing all!\nBelieve in yourself, try to improve, never surrender. And while doing all that…just enjoy what you have.\n","permalink":"https://emadashi.com/2008/10/the-story-of-a-winning-frog-a-story-we-all-know-and-few-comprehend/","summary":"\u003cp\u003e\u003ca href=\"http://eashi.files.wordpress.com/2008/10/frog-cartoon.jpg\"\u003e\u003cimg loading=\"lazy\" decoding=\"async\" style=\"border-width:0;\" height=\"98\" alt=\"frog_cartoon\" src=\"https://eashi.files.wordpress.com/2008/10/frog-cartoon-thumb.jpg\" width=\"114\" border=\"0\" /\u003e\u003c/a\u003e\u003c/p\u003e\n\u003cp\u003eIf you don\u0026rsquo;t know it:\u003c/p\u003e\n\u003cblockquote\u003e\n\u003cp\u003eOnce upon a time there was a group of little frogs, who decided to go through a competition to climb a tower. The tower was high and difficult, and no one of the spectator frogs believed that any of the tiny frogs can make it to the top.\u003c/p\u003e\n\u003cp\u003eLittle frogs started climbing, while spectators yelling:\u003cbr\u003e\n– \u0026ldquo;oh my, it\u0026rsquo;s too high…I don\u0026rsquo;t think they can make it!\u0026rdquo;\u003cbr\u003e\n– \u0026ldquo;they are too young, how possibly can they reach the top?! that\u0026rsquo;s insane\u0026rdquo;\u003cbr\u003e\n.\u003cbr\u003e\n.\u003cbr\u003e\nShouting and yelling continued, while the little frogs surrendering one by one, except for this one little frog who kept going and going, climbing up further and further more. Surprising everyone, that frog made it to the top and he won the race! well…the only reason for his success that…HE WAS DEAF, he simple couldn\u0026rsquo;t hear the negative shouting of the spectators!\u003c/p\u003e","title":"The Story of a Winning Frog (a story we all know, and few comprehend)"},{"content":"Well, it\u0026rsquo;s moving on, very slow, but it\u0026rsquo;s moving!\nIf you have been following this blog, then I think you are familiar with Bunian, the open source project for charity organizations. During the last Bunian team meeting at the beginning of this week, the basic design emerged (still being discussed and subject to changes till the minute of this post); we have decided to skip the dummy DTO objects, and to try Business Objects (BO), where most of the business logic lays, rather than in a separate Business Service.\nThe design will be like the following:\nBusiness Object classes: like Child, or Family. These classes will have the correspondent business logic within, including the data access (although some may object) but data access will be through repository interface data member. Repository interfaces: each BO will hold an interface data member specific to the data access needs of that BO. For example, the Family BO will have the interface data member IFamilyRepository. These repository interfaces will have a parent repository interface IRepository. Concrete repository classes: as it may be obvious, it implements the repository interfaces mentioned above. These classes will be in different project, in order to be able to change the behavior depending on the Database (Microsoft SQL server, MySql, etc…)\nNote here that there will be no direct dependency on these concrete classes; they will be injected through IoC container which we haven\u0026rsquo;t chosen yet (most likely would be Windsor, available to discussion). MVP infrastructure: a project will host Views interfaces and their Presenters. The following diagrams are examples of the discussed above:\n– Business Objects using repository interfaces:\n– Concrete classes implementing repository interfaces:\nOf course all of this might be changed so let\u0026rsquo;s not hold our breath! so stay tuned if you want to know the end of the story 😉\nAny suggestions? comments?\n","permalink":"https://emadashi.com/2008/10/bunian-basic-design/","summary":"\u003cp\u003eWell, it\u0026rsquo;s moving on, very slow, but it\u0026rsquo;s moving!\u003c/p\u003e\n\u003cp\u003eIf you have been following this blog, then I think you are familiar with Bunian, the open source project for charity organizations. During the last Bunian team meeting at the beginning of this week, the basic design emerged (still being discussed and subject to changes till the minute of this post); we have decided to skip the dummy DTO objects, and to try Business Objects (BO), where most of the business logic lays, rather than in a separate Business Service.\u003c/p\u003e","title":"Bunian Basic Design"},{"content":"Through all the meetings I had in my life (the voluntary and the professional), all meetings shared key points that made it either successful and constructive, or a complete disaster and waste of time!\nThese key points can be summarized into:\nMeeting is conducted to achieve certain target , a solution to a problem, Keep the focus on that goal\nTime is valuable, and the participants will be very annoyed when they see their effort and time is wasted on a subject different from the one they originally agreed to sacrifice their time for. if the meeting was anything except resolving the original subject, it is a failure.\nall participants should be sincere to achieve the target of the meeting\nBecause we are humans:\nwe will still use meetings as war-ground to prove intelligence superiority over others, by interruptions, mockery and shouting (in extreme situations). This will not be disruptive to the meeting only, but also will be for the team as a whole! most likely you will loose quite people hate “arguing”, who might have a very smart opinion and potentials. And then you will have the side effects of bad relations within the team; nothing have worse influence than that.\nThe coordinator role here is to prevent such situations by eliminating any reason the participants may use to act so selfish; not encouraging them, not letting them sneak with the interruption, etc. this goes beyond the meeting as well by raising the team spirit within the team members Another less serious example of unfaithfulness is the will to support wrong opinion because it\u0026rsquo;s easier, or less tiring. Again, the coordinator should be careful, and try to make the individuals targets of the team members pour in the projects target (or at least the meeting target), this also needs a lot of effort and team building actions (and that\u0026rsquo;s another story). Interruptions are evil and should be eliminated To know how bad interruption is, imagine your self talking in a meeting, all passionate and ongoing…suddenly a guy thinks you are talking nonsense, or that he is smarter than you are, and interrupts you…aaa\u0026rsquo;a!!…see how bad it is!! it wastes time, energy, and produces anger and disrespect. so is prattling! The more the prattle, the less the focus… the less the focus, the more the meeting loses the target. prattling can be as distructive as the interruptions, make participants less interested and even angry, hence failing meeting.\nDon\u0026rsquo;t offend others by any means. If you do so, a wall will be built instantly between the meeting and the guy offended; he will not be able to listen to any sound logic (by nature), and will prove anything to be wrong. as long as you are discussing ideas, people will feel safe, when you bring it to their essence, they will be too protective. be cautions choosing the right words.\nSilent people can be a hidden treasure The meeting is not meant to choose country presidents, it\u0026rsquo;s meant to elicit sound logic and constructive opinions, even if it comes from that silent little participant at the corner. if you are in charge, give him a chance, let him speak his ideas out, it might surprise you how good it can be, And if it is, you have raised his self-esteem to be more participating in the future and more successful team.\nYou can see from the points listed that it\u0026rsquo;s not only the coordinators responsibility to make the meeting successful, but the participants as well, after all they are the meeting!\nThere are lot\u0026rsquo;s of such points, but those are the one\u0026rsquo;s that come to my mind. If you have more to add, your comments below are most welcomed.\n","permalink":"https://emadashi.com/2008/10/successful-meetings-is-the-responsibility-of-all/","summary":"\u003cp\u003eThrough all the meetings I had in my life (the voluntary and the professional), all meetings shared key points that made it either successful and constructive, or a complete disaster and waste of time!\u003c/p\u003e\n\u003cp\u003eThese key points can be summarized into:\u003c/p\u003e\n\u003cul\u003e\n\u003cli\u003e\n\u003cp\u003e\u003cstrong\u003eMeeting is conducted to achieve certain target , a solution to a problem, Keep the focus on that goal\u003c/strong\u003e\u003cbr\u003e\nTime is valuable, and the participants will be very annoyed when they see their effort and time is wasted on a subject different from the one they originally agreed to sacrifice their time for. if the meeting was anything except resolving the original subject, it is a failure.\u003c/p\u003e","title":"Successful Meetings Is The Responsibility Of All"},{"content":"Yesterday was my last day in estarta, marking the end of nice period full of experience, knowledge, and amazing friends who have been like a family.\nAnd now it\u0026rsquo;s time to move on, as a Technical Team Leader in esense. The excitement increases as time goes by (since I haven\u0026rsquo;t started there yet), I have only one week of preparations to step back into this role (yes, I have been TTL before) in this new environment, can\u0026rsquo;t wait.\nLooking behind, it\u0026rsquo;s not an easy feeling; departing such people who are dear to me! but my condolences is that I am not leaving the country anytime soon (so we will meet guys 🙂 ), and I\u0026rsquo;m full of hope that I\u0026rsquo;ll find such great environment in esense as well.\n","permalink":"https://emadashi.com/2008/10/changing-jobs/","summary":"\u003cp\u003eYesterday was my last day in \u003ca href=\"http://www.estartasolutions.com\"\u003eestarta\u003c/a\u003e, marking the end of nice period full of experience, knowledge, and amazing friends who have been like a family.\u003c/p\u003e\n\u003cp\u003eAnd now it\u0026rsquo;s time to move on, as a Technical Team Leader in \u003ca href=\"http://www.esensesoftware.com/\"\u003eesense\u003c/a\u003e. The excitement increases as time goes by (since I haven\u0026rsquo;t started there yet), I have only one week of preparations to step back into this role (yes, I have been TTL before) in this new environment, can\u0026rsquo;t wait.\u003c/p\u003e","title":"Changing Jobs"},{"content":" في السنوات الأخيرة، كثر الحديث عن رؤية الهلال، و تحديد بدايات الأشهر القمرية، و لا سيما شهر رمضان و شوال لأهمتيهما. و احتار الناس بين البيانات الرسمية الصادرة عن المؤسسات الحكومية من جهة (نتيجة إدلاء شهود برؤية الهلال)، و المؤسسات الفلكية المتخصصة من جهة أخرى. الموضوع -على عقده- بسيط؛ فلتحديد بادية هذه الأشهر الحساسة تعتمد المؤسسات الحكومية على شهادة مواطنين شهدوا برؤية الهلال، و هذا أمر طيب. لكن المشكلة أن لخمسين عاما خلت من الآن، كانت معظم تلك الشهادات خاطئة و ليس لها أساس من الصحة (و ما زالت)! لم يكن بالإمكان -من خلال الوسائل المتاحة للمؤسسات المسؤولة حينئذ- أن تتأكد من صحتها. كان يكفي أن يكون مسلما عاقلا بالغا راشدا، و لا يزال الأمر كذلك. لكن في الآونة الأخيرة، اجتهدت المؤسسات الفلكية (و على رأسها المشروع الإسلامي لرصد الأهلة) أن تبين هذا الأمر، بما أن لديها العلم الكافي و الكوادر المؤهلة كي تبين لهذه المؤسسات أن الشهادات في معظمها خاطئة! فبادرت بنشر الأوراق العلمية، و الخطابات الرسمية، و الظهور على وسائل الإعلام لعظم الأمر، و من هنا بدأ وعي الناس للموضوع، لكن للأسف لم تستجب هذه المؤسسات، فكانت البلبلة. لكي يتضح الأمر أكثر، الشكل(1) الذي يبين منظر الأفق في الحالة الطبيعية عند امكانية رؤية الهلال: الشكل (1) الشمس تحت الأفق (غابت تماما)، وهجها بدأ بالخفوت، و القمر بعيد نسبيا عنها و فوق الأقق بمسافة تسمح لتكون الهلال، و تسمح للعين البشرية إبصاره. أما في الشكل (2)، فيكون في حالة لا يمكن فيها رؤية الهلال لقربه الشديد من الشمس، فوهج الشمس يمنع رؤيته: الشكل (2) و أما في الشكل (3)، فإن رؤية الهلال مستحيلة! لأن القمر يغيب أصلا قبل الشمس، فلا يوجد شيء بالأفق لرصده من الأساس!!: الشكل (3) و معظم الحالات التي يشهد فيها هؤلاء الشهود تكون في الحالة الأخيرة التي لا يوجد فيها هلال أصلا!!! و لا حول و لا قوة إلا بالله! للمزيد من المعلومات، انظر المراجع التالية: الفرق بين الهلال و تولد الهلال الهلال بين الحسابات الفلكية والرؤية نتائج رصد الهلال العالمية لشوال هذا العام 1429 تقويم نسب الخطأ في تحديد أوائل الأشهر الهجرية (في الأردن) و إن كنت مهتما بعلوم الفلك التطبيقية المتعلقة بالشريعة، اتبع هذا الرابط لمزيد من البحوث.","permalink":"https://emadashi.com/2008/10/%D9%81%D9%8A-%D8%A3%D9%8A-%D9%8A%D9%88%D9%85-%D8%A7%D9%84%D8%B9%D9%8A%D8%AF%D8%9F/","summary":"\u003cdiv dir=\"rtl\"\u003e\n  \u003cp align=\"right\"\u003e\n    في السنوات الأخيرة، كثر الحديث عن رؤية الهلال، و تحديد بدايات الأشهر القمرية، و لا سيما شهر رمضان و شوال لأهمتيهما. و احتار الناس بين البيانات الرسمية الصادرة عن المؤسسات الحكومية من جهة (نتيجة إدلاء شهود برؤية الهلال)، و المؤسسات الفلكية المتخصصة من جهة أخرى.\n  \u003c/p\u003e\n  \u003cp align=\"right\"\u003e\n    الموضوع -على عقده- بسيط؛ فلتحديد بادية هذه الأشهر الحساسة تعتمد المؤسسات الحكومية على شهادة مواطنين شهدوا برؤية الهلال، و هذا أمر طيب. لكن المشكلة أن لخمسين عاما خلت من الآن، كانت معظم تلك الشهادات خاطئة و ليس لها أساس من الصحة (و ما زالت)!  لم يكن بالإمكان -من خلال الوسائل المتاحة للمؤسسات المسؤولة حينئذ- أن تتأكد من صحتها. كان يكفي أن يكون مسلما عاقلا بالغا راشدا، و لا يزال الأمر كذلك.\n  \u003c/p\u003e","title":"في أي يوم العيد؟"},{"content":"My previous employer Rapsyx decided lately to publish the light version of it\u0026rsquo;s prime product RapidOne as free software.\nRapidOne in short words:\nRapidOne Team provides a single application to handle communication, workplanning and resource sharing across the organization with a highly innovative storage concept organizing your data naturally\nWith the ability to add a whole set of CRM components depending on the version you choose.\nInteresting? have a look at the free version here\n","permalink":"https://emadashi.com/2008/10/free-collaboration-software/","summary":"\u003cp\u003eMy previous employer \u003ca href=\"http://www.rapsyx.com\"\u003eRapsyx\u003c/a\u003e decided lately to publish the light version of it\u0026rsquo;s prime product RapidOne as free software.\u003c/p\u003e\n\u003cp\u003eRapidOne in short words:\u003c/p\u003e\n\u003cblockquote\u003e\n\u003cp\u003eRapidOne Team provides a single application to handle communication, workplanning and resource sharing across the organization with a highly innovative storage concept organizing your data naturally\u003c/p\u003e\u003c/blockquote\u003e\n\u003cp\u003eWith the ability to add a whole set of CRM components depending on the version you choose.\u003c/p\u003e\n\u003cp\u003eInteresting? have a look at the free version \u003ca href=\"http://www.rapid-one.com/\"\u003ehere\u003c/a\u003e\u003c/p\u003e","title":"Free Collaboration Software"},{"content":"recently, we had to clean the database from all the testing data, when an error similar to the following appeared:\nThe value \u0026quot;\u0026quot; is not of type \u0026ldquo;System.Nullable`1[System.DateTime]\u0026rdquo; and cannot be used in this generic collection\nThe code I executed was:\nIQuery query = DbManager.MySession.CreateQuery(\u0026#34;select max(dateObject.EndDate) from DateDomain dateObject\u0026#34;); IList\u0026lt;DateTime?\u0026gt; list = query.List\u0026lt;DateTime?\u0026gt;(); When I debugged NHibernate code, I reached to the following AddAll() method in the ArrayHelper class:\n// NH-specific public static void AddAll(IList to, IList from) { foreach (object obj in from) { to.Add(obj); } } You can find the explanation of the error here.\nWhich brings us to the interesting question: why the implementation of IList Add method doesn\u0026rsquo;t consider the \u0026ldquo;nullability\u0026rdquo; of the T object? and why the parameter is of type IList?!\nAm I missing something? should I report it as a bug?\n","permalink":"https://emadashi.com/2008/09/nhibernate-possible-bug-in-iquerylistt/","summary":"\u003cp\u003erecently, we had to clean the database from all the testing data, when an error similar to the following appeared:\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eThe value \u0026quot;\u0026quot; is not of type \u0026ldquo;System.Nullable`1[System.DateTime]\u0026rdquo; and cannot be used in this generic collection\u003c/strong\u003e\u003c/p\u003e\n\u003cp\u003eThe code I executed was:\u003c/p\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-csharp\" data-lang=\"csharp\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eIQuery query = DbManager.MySession.CreateQuery(\u003cspan style=\"color:#e6db74\"\u003e\u0026#34;select max(dateObject.EndDate) from DateDomain dateObject\u0026#34;\u003c/span\u003e);\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eIList\u0026lt;DateTime?\u0026gt; list = query.List\u0026lt;DateTime?\u0026gt;();\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cp\u003eWhen I debugged NHibernate code, I reached to the following AddAll() method in the ArrayHelper class:\u003c/p\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-csharp\" data-lang=\"csharp\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#75715e\"\u003e// NH-specific\u003c/span\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\u003cspan style=\"color:#66d9ef\"\u003epublic\u003c/span\u003e \u003cspan style=\"color:#66d9ef\"\u003estatic\u003c/span\u003e \u003cspan style=\"color:#66d9ef\"\u003evoid\u003c/span\u003e AddAll(IList to, IList \u003cspan style=\"color:#66d9ef\"\u003efrom\u003c/span\u003e)\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e{\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    \u003cspan style=\"color:#66d9ef\"\u003eforeach\u003c/span\u003e (\u003cspan style=\"color:#66d9ef\"\u003eobject\u003c/span\u003e obj \u003cspan style=\"color:#66d9ef\"\u003ein\u003c/span\u003e \u003cspan style=\"color:#66d9ef\"\u003efrom\u003c/span\u003e)\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    {\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e        to.Add(obj);\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    }\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e}\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cp\u003eYou can find the explanation of the error \u003ca href=\"http://social.msdn.microsoft.com/Forums/en-US/netfxbcl/thread/abc99fb5-e218-4efa-8969-3d96f6021cee/\"\u003ehere\u003c/a\u003e.\u003cbr\u003e\nWhich brings us to the interesting question: why the implementation of IList Add method doesn\u0026rsquo;t consider the \u0026ldquo;nullability\u0026rdquo; of the T object? and why the parameter is of type IList?!\u003c/p\u003e","title":"NHibernate possible bug in IQuery.List\u003cT\u003e()"},{"content":"In the early days when the Internet was Blog-free, my machine was light and clean, it was barely Visual Sutdio, SQL Server Express (then it was called MSDE) , Office, MSN and IIS. I always believed in the light clean machine, no goofy software around.\nThen Blogs started to appear, and more interesting blogs had my attention like Scott\u0026rsquo;s and Omar\u0026rsquo;s, and with it I started to learn about new software gadgets. From that day, I am addicted!\nFirst it was the Ultimate Tools List, I browsed it, and out of interest I downloaded Launchy, AMAZING (can\u0026rsquo;t live without it)!! then Notepad++ then SyncToy, then Process Explorer, Cropper, and I couldn\u0026rsquo;t stop!\nNow there are wonderful sites like FileHippo that is a prime source for new software gadgets and their update news. but the surprise was Wakoopa; who thought there would be a whole social community website built around software enthusiasm!\nBut anyway, I still believe in clean and light machines, I don\u0026rsquo;t download toys that I don\u0026rsquo;t need, and regularly monitor their effect on my machine; the beauty of both worlds 🙂\n","permalink":"https://emadashi.com/2008/09/software-gadgets/","summary":"\u003cp\u003eIn the early days when the Internet was Blog-free, my machine was light and clean, it was barely Visual Sutdio, SQL Server Express (then it was called MSDE) , Office, MSN and IIS. I always believed in the light clean machine, no goofy software around.\u003c/p\u003e\n\u003cp\u003eThen Blogs started to appear, and more interesting blogs had my attention like \u003ca href=\"http://www.computerzen.com\"\u003eScott\u0026rsquo;s\u003c/a\u003e and \u003ca href=\"http://www.shahine.com/omar/\"\u003eOmar\u0026rsquo;s\u003c/a\u003e, and with it I started to learn about new software gadgets. From that day, I am addicted!\u003c/p\u003e","title":"Software gadgets"},{"content":"Happy Ramadan all, I hope you all get the best out of it, and may Allah grant you his acceptance and blessings.\n","permalink":"https://emadashi.com/2008/08/%D8%B1%D9%85%D8%B6%D8%A7%D9%86-%D9%83%D8%B1%D9%8A%D9%85-happy-ramadan/","summary":"\u003cp\u003eHappy \u003ca href=\"http://en.wikipedia.org/wiki/Ramadan\"\u003eRamadan\u003c/a\u003e all, I hope you all get the best out of it, and may Allah grant you his acceptance and blessings.\u003c/p\u003e","title":"رمضان كريم …Happy Ramadan"},{"content":"\nWhat could be better, as an Open Source project, than a charity application! where your code is really worth something valuable; a smile on an innocent orphan face, or new clothes for a needy family in Eid.\nAnnouncing new open source project Bunian; the excitement is indescribable! eager to reach with it a stage when it\u0026rsquo;s really alive, doing something good out there for needy people. I understand it\u0026rsquo;s going to take so much to drive a successful project, but with the right contributions from the right people like you…I am sure things will just work fine.\nHere is the summary I came up with to describe the project in the least amount of words:\nBunian is a charity web application that will make it easy for the generous people, who want to give, to reach for the poor, who need and yet cannot be reached.\nCharity organizations who use Bunian, will enable Sponsors to browse through list of Beneficiaries already registered with the organization, depending on different criteria, giving the Sponsors the ability to Request to sponsor certain Beneficiary, who can be Orphan, Family…etc.\nFor the time being, there will be no handling for charity transactions, the web application is only meant for communication.\nThe basic target technology is ASP.NET 3.5, NHibernate, and Microsoft SQL database, the initial structure and code is already uploaded on the source control over codeplex (an open source project hosting website), you can download the source code here.\nThere are lots to do, and lots of ideas that can enrich the project, I surely cannot do it alone, so if you think you have the time and skills, then you are more than welcome to join the project. Even if you don\u0026rsquo;t want to join, your comments and advices are still highly appreciated, and thanks in advance.\nMore posts will be coming concerning Bunian, there is still lots to say which I will postpone till its right time.\n","permalink":"https://emadashi.com/2008/08/announcing-open-source-project-bunian/","summary":"\u003cp\u003e\u003ca href=\"http://eashi.files.wordpress.com/2008/08/opensource-logo.jpg\"\u003e\u003cimg loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-91\" src=\"https://eashi.files.wordpress.com/2008/08/opensource-logo.jpg\" alt=\"\" width=\"181\" height=\"156\" /\u003e\u003c/a\u003e\u003c/p\u003e\n\u003cp\u003eWhat could be better, as an \u003ca href=\"http://en.wikipedia.org/wiki/Open_source\"\u003eOpen Source\u003c/a\u003e project, than a charity application! where your code is really worth something valuable; a smile on an innocent orphan face, or new clothes for a needy family in \u003ca href=\"http://en.wikipedia.org/wiki/Eid_ul-Fitr\"\u003eEid\u003c/a\u003e.\u003c/p\u003e\n\u003cp\u003eAnnouncing new open source project \u003ca href=\"http://www.codeplex.com/Bunian\"\u003eBunian\u003c/a\u003e; the excitement is indescribable! eager to reach with it a stage when it\u0026rsquo;s really alive, doing something good out there for needy people. I understand it\u0026rsquo;s going to take so much to drive a successful project, but with the right contributions from the right people like you…I am sure things will just work fine.\u003c/p\u003e","title":"Announcing open source project Bunian"},{"content":"I had to read documentation, articles, many blog entries and go into discussions with colleagues… all to get the root of this ambiguous attribute of NHibernate, it is trickey!\nThis blog entry is another trial to explain the attribute, but with taking one more detailed step into the explanation.\nNHibernate is meant to persist objects as well as to manage their relations to each other, lets take a look at the following example of Parent and Child classes:\npublic class Parent { public virtual int Id { get; set; } public virtual string Name { get; set; } public virtual IList\u0026lt;Child\u0026gt; MyChildren { get; set; } } public class Child { public virtual int Id { get; set; } public virtual string Name { get; set; } public virtual Parent MyParent { get; set; } } and we have corresponding tables to these two classes like the following:\n(note 1: as we are proceeding that there is no Null constraint on the ParentId foreign key in the Child Table)\nFinally, we check the interesting part of the mapping files:\nParent: \u0026lt;bag name=\u0026#34;MyChildren\u0026#34; table=\u0026#34;Child\u0026#34; cascade=\u0026#34;all\u0026#34;\u0026gt; \u0026lt;key column=\u0026#34;ParentId\u0026#34;/\u0026gt; \u0026lt;one-to-many class=\u0026#34;Child\u0026#34;/\u0026gt; \u0026lt;/bag\u0026gt; Child: \u0026lt;many-to-one name=\u0026#34;MyParent\u0026#34; class=\u0026#34;Parent\u0026#34;\u0026gt; \u0026lt;column name=\u0026#34;ParentId\u0026#34;/\u0026gt; \u0026lt;/many-to-one\u0026gt; (note 2: all what the cascade=\u0026quot;all\u0026quot; attribute in the MyChildren bag does is that whenever you save the Parent, all the Child objects in the MyChildren collection are forced to be saved as well; and we are only talking about the Save operation; not interfering or changing any of the values of the Child properties)\nNow if we execute the following code:\nParent par = Session.Get\u0026lt;Parent\u0026gt;(8); Child ch = new Child(); ch.Name = \u0026#34;Emad\u0026#34;; par.MyChildren.Add(ch); Session.Save(par); As you may expect, both objects \u0026ldquo;par\u0026rdquo; and \u0026ldquo;ch\u0026rdquo; will be saved due to note 2 we mentioned above, but the surprise is that when you check the values in the database, you will see that the ParentId field was set as well although we didn\u0026rsquo;t set it explicitly in the code!\nThe reason is that there is a hidden attribute called \u0026ldquo;Inverse\u0026rdquo; in the bag part of the Parent map file whose default value is \u0026ldquo;false\u0026rdquo;; when this attribute is set to false like the default value, then the Parent says: \u0026ldquo;Oh, so it is my responsibility to maintain the relationship with my child objects, ok then whenever a child is added to my collection, when I am saved\u0026hellip;I will perform an update SQL statement to their foreign key to point at me\u0026rdquo;\nSo when the Save is called, the \u0026ldquo;par\u0026rdquo; object is saved, and the \u0026ldquo;ch\u0026rdquo; is inserted because calling Session.Save(object) when the object is new it will be inserted. And after all that happens, an explicit update SQL statement will be executed to update all the child objects to set the foreign key ParentId to the par object Id.\nThis goes all fine in our case, only due to note 1 (scroll up again); we don\u0026rsquo;t have a Null constraint on the foreign key ParentId, so the Insert statement is executed without exceptions, but in most cases in the world, DBA do put this constraint, by that we will get a \u0026ldquo;cannot insert Null value in ParentId\u0026rdquo; exception!\nThe solution is to set the Inverse attribute to \u0026ldquo;true\u0026rdquo;, which means that the Parent will NOT update the Child objects foreign key, it will only call Session.Save(ch) due to the cascade attribute, so the result will be like record 6:\nBut then how to solve this problem?! we want to set the value of ParentId AND be able to preserve the Null constraint; so we need to set the MyParent property of the Child to the Parent \u0026ldquo;par\u0026rdquo; like line 4:\n1 Parent par = Session.Get\u0026lt;Parent\u0026gt;(8); 2 Child ch = new Child(); 3 ch.Name = \u0026#34;Emad\u0026#34;; 4 ch.MyParent = par; 5 par.MyChildren.Add(ch); 6 Session.Save(par); and to make it graceful, we can create custom collection for the Children and in the Add method of the collection we set the passed Child objects property MyParent to the parent.\nYou can download the code sample here.\nI hope this is detailed enough to explain what the Inverse attribute exactly is, how to go about the Null exception, and to understand that the attributes \u0026ldquo;Inverse\u0026rdquo; and \u0026ldquo;cascade\u0026rdquo; are different things.\n","permalink":"https://emadashi.com/2008/08/nhibernate-inverse-attribute/","summary":"\u003cp\u003eI had to read documentation, articles, many blog entries and go into discussions with colleagues… all to get the root of this ambiguous attribute of NHibernate, it is trickey!\u003cbr\u003e\nThis blog entry is another trial to explain the attribute, but with taking one more detailed step into the explanation.\u003c/p\u003e\n\u003cp\u003eNHibernate is meant to persist objects as well as to manage their relations to each other, lets take a look at the following example of Parent and Child classes:\u003c/p\u003e","title":"NHibernate Inverse attribute"},{"content":"I wanted to map an integer enumeration type in NHibernate, I googled “mapping enumeration in NHibernate” and the best explanation was of Jeremy Miller in his post here.\nBut as it appears (and according to my understanding) that the enumeration type should be mapped to a database column of characters type (varchar, char,…etc).\nWhat if the database column was int? well…do exactly like what jeremy did except simply use “NHibernate.Type.PersistentEnumType” instead of “NHibernate.Type.EnumStringType“.\nThe sole purpose of this post is that I didn\u0026rsquo;t find this solution fast enough on google, so I hope it helps others faster.\n","permalink":"https://emadashi.com/2008/08/mapping-enumeration-of-type-int-in-nhibernate/","summary":"\u003cp\u003eI wanted to map an integer enumeration type in NHibernate, I googled “mapping enumeration in NHibernate” and the best explanation was of Jeremy Miller in his post \u003ca href=\"http://codebetter.com/blogs/jeremy.miller/archive/2006/02/20/138732.aspx\"\u003ehere\u003c/a\u003e.\u003c/p\u003e\n\u003cp\u003eBut as it appears (and according to my understanding) that the enumeration type should be mapped to a database column of characters type (varchar, char,…etc).\u003cbr\u003e\nWhat if the database column was int? well…do exactly like what jeremy did except simply use “\u003cstrong\u003eNHibernate.Type.PersistentEnumType\u003c/strong\u003e” instead of “\u003cstrong\u003eNHibernate.Type.EnumStringType\u003c/strong\u003e“.\u003c/p\u003e","title":"Mapping Enumeration of type int in NHibernate"},{"content":" ذات يوم خلال الأسبوع الماضي، صدف أن استضافني صديق لي في منزله. جلسنا أمام التلفاز، ثم بدأت عملية القفز العشوائي التي اعتدناها – نحن كمجتمع – بين محطات اللاقط. و في خضم المتعة العشوائية، استوقفت مضيفي محطة معروفة، كان يعلو منها حينها صراخ و عويل. و بنظرة منهكة، توجه إلي صديقي و سألني: “هل تعرف ما هذا؟” لم تكن الصور صورا إخبارية حقيقية، لكن كانت صورا من مسلسل…ثم سأل متنهدا :”هل سمعت عن التغريبة؟”، كانت علامات الاستغراب التي اعتلت وجهي جوابا كافيا له. فاستطرد قائلا: “إنها التغريبة الفلسطينة…تحكي قصة ضياع فلسطين!”. لوهلة كأني سمعت الكلمة لأول مرة “ضياع فلسطين”!… وجهت أنظاري مرة أخرى للشاشة تتحرك فيها صور التهجير، و المعاناة، و الجوع، و الخوف. ثم و كأن الصور بدأت بالتدفق من عيوني إلى صدري، فضاق، فخفت، ثم كان شعور الغربة و الخسارة، خسارة الأرض، و خسارة الأحبة، و خسارة الشجاعة، و خسارة العزة!\nاكتأبت، و عندها بدأت أفهم النعام، بدأت أشغل نفسي بأي شيء، أبحث عن أي شيء يصرف تفكيري عن…عن حقيقة أننا منذ إذن.. و نحن نهرب دون توقف…هربنا من الموت حينها، و الآن من ضمائرنا نحن نهرب. خرجت الكلمات على استحياء مطالبا بإقفال التلفاز، و كأني أقول لنفسي…آسف. ","permalink":"https://emadashi.com/2008/08/ostriches/","summary":"\u003cp dir=\"rtl\"\u003e\n  ذات يوم خلال الأسبوع الماضي، صدف أن استضافني صديق لي في منزله. جلسنا أمام التلفاز، ثم بدأت عملية القفز العشوائي التي اعتدناها – نحن كمجتمع – بين محطات اللاقط.\n\u003c/p\u003e\n\u003cp dir=\"rtl\"\u003e\n  و في خضم المتعة العشوائية، استوقفت مضيفي محطة معروفة، كان يعلو منها حينها صراخ و عويل. و بنظرة منهكة، توجه إلي صديقي و سألني: “هل تعرف ما هذا؟” لم تكن الصور صورا إخبارية حقيقية، لكن كانت صورا من مسلسل…ثم سأل متنهدا :”هل سمعت عن التغريبة؟”، كانت علامات الاستغراب التي اعتلت وجهي جوابا كافيا له. فاستطرد قائلا: “إنها التغريبة الفلسطينة…تحكي قصة ضياع فلسطين!”.\n\u003c/p\u003e","title":"نعام"},{"content":"Do you go through the same, time-consuming, frustrating discussion with your colleagues when you want to decide what to have for lunch? well…this is exactly what we have been going through where I work.\nTo solve the problem (partially, because humans can never totally agree! ), I made a small, quick and dirty web application; LunchPoll.\nThe user (Active Directory user, it works on Windows Authentication) would go to the home page, select the available poll:\nThen a list of all available restaurants will show up. The restuarants\u0026rsquo; names are in arabic, so don\u0026rsquo;t be frightned if you didn\u0026rsquo;t understand the names 🙂 :\nThe user will assign a weight for each restaurant depending on his taste for today, and no two restaurants can have the same weight.\nAnd after submitting the poll, the user will see the results; all the restaurants will appear, each one with the value of its weigt next to it, along with the voters names who voted for now:\nyou can download the source code here. bon apetite 😉\np.s. There is no administration interface, so you will have insert restaurants in the Restaurants table, and Insert an entry for each new poll in the Polls table, giving the Status column the value “1”\np.p.s That never stopped the arguments 😛\n","permalink":"https://emadashi.com/2008/08/how-we-decide-what-to-have-for-lunch/","summary":"\u003cp\u003e\u003ca href=\"http://eashi.files.wordpress.com/2008/08/croppercapture5.jpg\"\u003e\u003c/a\u003e\u003ca href=\"http://eashi.files.wordpress.com/2008/08/croppercapture41.jpg\"\u003e\u003c/a\u003eDo you go through the same, time-consuming, frustrating discussion with your colleagues when you want to decide what to have for lunch? well…this is exactly what we have been going through where I work.\u003c/p\u003e\n\u003cp\u003eTo solve the problem (partially, because humans can never totally agree! \u003ca href=\"http://eashi.files.wordpress.com/2008/08/4.gif\"\u003e\u003cimg loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-61\" src=\"https://eashi.files.wordpress.com/2008/08/4.gif?w=18\" alt=\"\" width=\"18\" height=\"18\" /\u003e\u003c/a\u003e), I made a small, quick and dirty web application; LunchPoll.\u003c/p\u003e\n\u003cp\u003eThe user (Active Directory user, it works on Windows Authentication) would go to the home page, select the available poll:\u003c/p\u003e","title":"How we decide what to have for lunch"},{"content":"Lately, I have been living a financial chaos; I couldn\u0026rsquo;t tell how much money I had in the bank, lent to friends or in my Pocket! (ok the last one was exaggeration…I could count it anytime :P).\nI decided to put an end to this, so I started looking for a software to track my financial status; went through many solutions starting from Excell sheets passing by GNUCash, AceMoneyLite , and ending with Microsoft Office Accounting Express (the latter makes me want to start my own business! wow).\nNothing seemed to meet my simple requirements of …just…tracking my money!\nThen I found it! ClearCheckBook; very simple, web-based and effective! you can define Your Accounts (your pocket, bank,..etc), define your expenses and income categories (Food, Gas,…etc), and insert your transactions depending on the Accounts and Categories. and you are on!\nhere are some screenshots that you might find interesting:\nhttps://www.clearcheckbook.com/tour.php\nenjoy managing your finance!\np.s. there are some competitiors like Mint and MySpendingPlan but Mint makes it compulsory to have an existing account with a known bank to their service, and MySpendingPlan had many JavaScript errors while I was browsing.\n","permalink":"https://emadashi.com/2008/07/track-your-financial-status/","summary":"\u003cp\u003eLately, I have been living a financial chaos; I couldn\u0026rsquo;t tell how much money I had in the bank, lent to friends or in my Pocket! (ok the last one was exaggeration…I could count it anytime :P).\u003c/p\u003e\n\u003cp\u003eI decided to put an end to this, so I started looking for a software to track my financial status; went through many solutions starting from Excell sheets passing by \u003ca href=\"http://www.gnucash.org/\" title=\"http://www.gnucash.org/\"\u003eGNUCash\u003c/a\u003e, \u003ca href=\"http://www.mechcad.net/products/acemoney/index_lite.shtml\" title=\"http://www.mechcad.net/products/acemoney/index_lite.shtml\"\u003eAceMoneyLite \u003c/a\u003e, and ending with \u003ca href=\"http://office.microsoft.com/en-us/accountingexpress/FX101729681033.aspx?ofcresset=1\" title=\"http://office.microsoft.com/en-us/accountingexpress/FX101729681033.aspx?ofcresset=1\"\u003eMicrosoft Office Accounting Express\u003c/a\u003e (the latter makes me want to start my own business! wow).\u003cbr\u003e\nNothing seemed to meet my simple requirements of …just…tracking my money!\u003c/p\u003e","title":"Track your financial status"},{"content":"On friday, my mothers cousin died in a car accedent on a highway; he, his wife and one of his 3 kids died in the accedent! the 2nd child is in comma while the 3rd survived.\nIt was shocking! the last week he was enjoying the holiday at his family\u0026rsquo;s place with his three kids!\nThe more we live, the more it\u0026rsquo;s obvious how iferior this life is! the things you loved most could very easily disappear in one glimpse, and in a so hurting way! that\u0026rsquo;s why we should not cling to it at all, of course we do our best to live it right, but not make it our goal at all. Paradise is there waiting for those who submits to Allah and live through the path he showed by prophet Muhammad.\nGod says in the holy Quran:\nاعْلَمُوا أَنَّمَا الْحَيَاةُ الدُّنْيَا لَعِبٌ وَلَهْوٌ وَزِينَةٌ وَتَفَاخُرٌ بَيْنَكُمْ وَتَكَاثُرٌ فِي الْأَمْوَالِ وَالْأَوْلَادِ كَمَثَلِ غَيْثٍ أَعْجَبَ الْكُفَّارَ نَبَاتُهُ ثُمَّ يَهِيجُ فَتَرَاهُ مُصْفَرًّا ثُمَّ يَكُونُ حُطَامًا وَفِي الْآخِرَةِ عَذَابٌ شَدِيدٌ وَمَغْفِرَةٌ مِّنَ اللَّهِ وَرِضْوَانٌ وَمَا الْحَيَاةُ الدُّنْيَا إِلَّا مَتَاعُ الْغُرُورِ {20}\nKnow that this world\u0026rsquo;s life is only sport and play and gaiety and boasting among yourselves, and a vying in the multiplication of wealth and children, like the rain, whose causing the vegetation to grow, pleases the husbandmen, then it withers away so that you will see it become yellow, then it becomes dried up and broken down; and in the hereafter is a severe chastisement and (also) forgiveness from Allah and (His) pleasure; and this world\u0026rsquo;s life is naught but means of deception.\n","permalink":"https://emadashi.com/2008/07/when-a-family-dies-in-a-car-accedent/","summary":"\u003cp\u003eOn friday, my mothers cousin died in a car accedent on a highway; he, his wife and one of his 3 kids died in the accedent! the 2nd child is in comma while the 3rd survived.\u003cbr\u003e\nIt was shocking! the last week he was enjoying the holiday at his family\u0026rsquo;s place with his three kids!\u003c/p\u003e\n\u003cp\u003eThe more we live, the more it\u0026rsquo;s obvious how iferior this life is! the things you loved most could very easily disappear in one glimpse, and in a so hurting way! that\u0026rsquo;s why we should not cling to it at all, of course we do our best to live it right, but not make it our goal at all. Paradise is there waiting for those who submits to Allah and live through the path he showed by prophet Muhammad.\u003c/p\u003e","title":"When a family dies in a car accedent!"},{"content":"From the very first day I have heard about Agile development and I have been hearing things like “code comments are not such a good thing”\nThe main idea behind that is that the code should be self explanatory; giving functions good names and splitting concerns into different functions.\nBut what about the “why”; why this certain code is written this way? why not do it that way? and this is what I have gone through today!\nI was working on this bug I had which resulted with a really nasty Timeout Runtime error!\nI instantly remembered that there was some place in the code that had the same functionality, so I jumped to it and found it is doing the same thing….almost!\nWhy my code isn\u0026rsquo;t working?!…my code saves the domain object…and that code saves the domain object too! Ok, he is using the repository directly…and i am using the service…so what?!\nBeing that guy my team leader Muhammed Tobji, who happens to be a really smart guy, I was sure I was on the right track!\nAfter spending sometime struggling with that bug, I noticed a lot of comments above the that line of code of Tobjis, it said:\n“Don\u0026rsquo;t use the service…use the repository…or you will have a Timeout exception!!”\nGGRRRRR!!!\nIt was there! I don\u0026rsquo;t know how much time I could have wasted trying to find the solution, when the solution was already there! The code was almost cleanly refactored, the name of the functions were logical and self explantory, and yet..that was not enough! there was we still a need for comments because it was exceptional situaion (and software has lots of exceptional situations 😉 )\nmy conclusion is “use comments”! Be wise though, don\u0026rsquo;t comment the obvious, but in such situations…please…do post your code comment 🙂\n(thanks Tobji 😉 )\n","permalink":"https://emadashi.com/2008/07/are-code-comments-important/","summary":"\u003cp\u003eFrom the very first day I have heard about \u003ca href=\"http://en.wikipedia.org/wiki/Agile_development\" title=\"Agile Development\"\u003eAgile development\u003c/a\u003e and I have been hearing things like “\u003ca href=\"http://blog.gravityfree.ca/2006/11/myth-of-comments.html\" title=\"code comments are bad\"\u003ecode comments are not such a good thing\u003c/a\u003e”\u003c/p\u003e\n\u003cp\u003eThe main idea behind that is that the code should be self explanatory; giving functions good names and splitting concerns into different functions.\u003c/p\u003e\n\u003cp\u003eBut what about the “why”; why this certain code is written this way? why not do it that way? and this is what I have gone through today!\u003c/p\u003e","title":"Are code comments important?"},{"content":"Can the mind imagine how brutal the man kind can be!!\nThe last couple of days was the memory of one of the ugliest genocides took place in the recent history, with 8000 people killed mercilessly in couple of days!\nThe frightning side of the story is that it was under the supervision of the so called “The United Nations” (UN)!\nIs it surprising? I thought so at the beginning, but after the spread of the news about UN forces abusing children all over the glob , it isn\u0026rsquo;t any more!!\nI will leave you with the wikipedia article for more information about Srebrenica genocide:\nhttp://en.wikipedia.org/wiki/Srebrenica_massacre\n","permalink":"https://emadashi.com/2008/07/in-the-memory-of-srebrenica-genocide/","summary":"\u003cp\u003eCan the mind imagine how brutal the man kind can be!!\u003c/p\u003e\n\u003cp\u003eThe last couple of days was the memory of one of the ugliest genocides took place in the recent history, with 8000 people killed mercilessly in couple of days!\u003c/p\u003e\n\u003cp\u003eThe frightning side of the story is that it was under the supervision of the so called “The United Nations” (UN)!\u003cbr\u003e\nIs it surprising? I thought so at the beginning, but after the spread of the news about \u003ca href=\"http://www.timesonline.co.uk/tol/news/world/article4012013.ece\" title=\"UN child abuse in Bosnia, Haiti, Sudan, Ivory Coast, Kosovo...\"\u003eUN forces abusing children all over the glob\u003c/a\u003e , it isn\u0026rsquo;t any more!!\u003c/p\u003e","title":"In the memory of Srebrenica genocide"},{"content":"This is my first post from my new laptop HP Pavilion dv 6755ee 😀\nOverall, I am happy with what I am experiencing till now, except for:\n1- The fans opening is placed at the bottom of the laptop, which causing it to go on high temperature fast!\n2- There is something wrong about the text in some applications in Vista (like visual studio 2008), it\u0026rsquo;s somehow blurry, I googled it and found some posts that didn\u0026rsquo;t help; suggesting to take off ClearType or set a dpi option that is already checked!\nI will keep searching for a solution and see what I will come up with. Will keep you posted 😉\n","permalink":"https://emadashi.com/2008/07/new-laptop/","summary":"\u003cp\u003eThis is my first post from my new laptop HP Pavilion dv 6755ee 😀\u003c/p\u003e\n\u003cp\u003eOverall, I am happy with what I am experiencing till now, except for:\u003c/p\u003e\n\u003cp\u003e1- The fans opening is placed at the bottom of the laptop, which causing it to go on high temperature fast!\u003cbr\u003e\n2- There is something wrong about the text in some applications in Vista (like visual studio 2008), it\u0026rsquo;s somehow blurry, I googled it and found some posts that didn\u0026rsquo;t help; suggesting to take off ClearType or set a dpi option that is already checked!\u003c/p\u003e","title":"New laptop"},{"content":"I have been trying to figure out how the stats that WordPress provide works while hosting my blog, I FAILED!…or did they?\nIt was not a straightforward thing, I would click on a stat number that says I had certain number of views on one post today, I would click on it to see the chart is empty :S.\nAnyway, I am using FeedBurner now to see if things get any better.\nSo if by any chance you have subscribed to my blog, please change the feed address to the following:\nhttp://feeds.feedburner.com/eashi\n😉\n","permalink":"https://emadashi.com/2008/07/using-feedburner/","summary":"\u003cp\u003eI have been trying to figure out how the stats that WordPress provide works while hosting my blog, I FAILED!…or did they?\u003c/p\u003e\n\u003cp\u003eIt was not a straightforward thing, I would click on a stat number that says I had certain number of views on one post today, I would click on it to see the chart is empty :S.\u003c/p\u003e\n\u003cp\u003eAnyway, I am using \u003ca title=\"www.feedburner.com\" href=\"http://www.feedburner.com/\" target=\"_blank\"\u003eFeedBurner\u003c/a\u003e now to see if things get any better.\u003cbr\u003e\nSo if by any chance you have subscribed to my blog, please change the feed address to the following:\u003c/p\u003e","title":"Using FeedBurner"},{"content":"I have delivered the presentation I talked about in my previous post here.\nActually it was pretty simple and straightforward, the slides them selves don\u0026rsquo;t have code content; all the code was shown in VS directly (I always found it better to see the code in its really environment to better understand).\nThe attendees were handful, but if felt really great when they expressed how excited they were about the whole thing.\nYou can find the Power Point slides and the sample code in the following zipped file:\nhttp://www.freedrive.com/file/395364,emadnhibernatepresentation.zip\nI intend also to share with you the process I went through in order to conclude to the presentation in its final state.\nI hope you benefit from it 🙂\nUpdate: I did this presentation again with enhanced slides, you can find those slides on this post\n","permalink":"https://emadashi.com/2008/07/my-introduction-to-nhibernate-presentation-and-slides/","summary":"\u003cp\u003eI have delivered the presentation I talked about in my previous post \u003ca title=\"what is next\" href=\"http://eashi.wordpress.com/2008/06/21/what-is-next-2/\" target=\"_blank\"\u003ehere\u003c/a\u003e.\u003c/p\u003e\n\u003cp\u003eActually it was pretty simple and straightforward, the slides them selves don\u0026rsquo;t have code content; all the code was shown in VS directly (I always found it better to see the code in its really environment to better understand).\u003cbr\u003e\nThe attendees were handful, but if felt really great when they expressed how excited they were about the whole thing.\u003c/p\u003e","title":"My “Introduction to NHibernate” presentation and slides"},{"content":"The other day I wanted to create an HQL query to retrieve data from one object (WorkOrderFault) that has many-to-many relation with another. so I created the following:\nISession session = NHibernateOrmSessionFactory.CurrentNHibernateSession; IQuery query = session.CreateQuery( \u0026#34;select wof from WorkOrderFault wof join wof.WorkOrderTechnicians as tech where tech.Id = 43334\u0026#34;); IList\u0026lt;WorkOrderFault\u0026gt; objects = query.List\u0026lt;WorkOrderFault\u0026gt;(); The query ran successfully, and I got my results.\nThen I wanted to use paging and get certain amount of results starting from certain record, so I added these two lines directly after I instantiated the IQuery object:\nquery.SetMaxResults(10); query.SetFirstResult(0); Simple and nice, but instead I got the following error:\nSystem.Data.SqlClient.SqlException : The column ‘FaultId10_\u0026rsquo; was specified multiple times for ‘query'.\nWhen I checked my mapping file of WorkOrderFault, it had the following lines (I am including the lines we are interested in only):\n\u0026lt;property name=\u0026#34;FaultId\u0026#34; type=\u0026#34;System.Int32\u0026#34; column=\u0026#34;FaultID\u0026#34; not-null=\u0026#34;false\u0026#34; access=\u0026#34;field.camelcase-underscore\u0026#34; /\u0026gt; \u0026lt;many-to-one name=\u0026#34;Fault\u0026#34; class=\u0026#34;GRP.Maintenance.Domain.Settings.Faults\u0026#34; column=\u0026#34;FaultId\u0026#34; fetch=\u0026#34;select\u0026#34; insert=\u0026#34;false\u0026#34; update=\u0026#34;false\u0026#34; not-found=\u0026#34;exception\u0026#34; access=\u0026#34;field.camelcase-underscore\u0026#34; /\u0026gt; Ok, I know it\u0026rsquo;s wrong to map the same column for two different properties (don\u0026rsquo;t ask about the reason), but this is the current situation; one property to hold the Id (as an integer), and another property to hold everything. There might be more justifying situations where you want to map two properties to one column, so let\u0026rsquo;s assume it\u0026rsquo;s ok.\nNHibernate is smart enough, when using queries, to query the database field only once; in situations like this NHibernate figures out that there are two properties mapped to one column so it should not retrieve it twice (for example: select columnx as x1, columnx as x2 \u0026hellip;). But not in this case. It just did not work.\nI had no explanation for this, except when I looked closely to the map file, I noticed that the field causing the problem, \u0026ldquo;FaultID\u0026rdquo;, was written once with capital D and the other with small d.\nSo as it appears, NHibernate behaves inconsistently when it comes to database column case sensitivity; SQL itself is case-insensitive, but NHibernate code distinguishes between uppercase and lowercase.\nKeep an eye on your map files. Try to make them match the database casing exactly, and unify that through all your map files.\nUPDATE: The effect produced by SetMaxResults() is that it wraps the original SQL sentence with \u0026ldquo;WITH query AS (\u0026hellip;)\u0026rdquo;. Only then SQL refused the duplicate columns in the result, so the SqlException took place.\nOriginal SQL:\nselect workorderf0_.RecID as RecID10_, workorderf0_.WorkOrderID.... SQL after SetMaxResults:\nWITH query AS ( SELECT TOP 10 ROW_NUMBER() OVER (ORDER BY CURRENT_TIMESTAMP) as __hibernate_row_nr__, workorderf0_.RecID as RecID10_... ) ","permalink":"https://emadashi.com/2008/06/columns-case-sensitivity-in-nhibernate/","summary":"\u003cp\u003eThe other day I wanted to create an HQL query to retrieve data from one object (WorkOrderFault) that has many-to-many relation with another. so I created the following:\u003c/p\u003e\n\u003cdiv class=\"highlight\"\u003e\u003cpre tabindex=\"0\" style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;\"\u003e\u003ccode class=\"language-csharp\" data-lang=\"csharp\"\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eISession session = NHibernateOrmSessionFactory.CurrentNHibernateSession;\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eIQuery query = session.CreateQuery(\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e    \u003cspan style=\"color:#e6db74\"\u003e\u0026#34;select wof from WorkOrderFault wof join wof.WorkOrderTechnicians as tech where tech.Id = 43334\u0026#34;\u003c/span\u003e);\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003e\n\u003c/span\u003e\u003c/span\u003e\u003cspan style=\"display:flex;\"\u003e\u003cspan\u003eIList\u0026lt;WorkOrderFault\u0026gt; objects = query.List\u0026lt;WorkOrderFault\u0026gt;();\n\u003c/span\u003e\u003c/span\u003e\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003cp\u003eThe query ran successfully, and I got my results.\u003c/p\u003e\n\u003cp\u003eThen I wanted to use paging and get certain amount of results starting from certain record, so I added these two lines directly after I instantiated the IQuery object:\u003c/p\u003e","title":"Columns’ case-sensitivity in NHibernate"},{"content":"In one of the modules I am working on, my unit tests used to take tremendous amount of time (4 minutes per test 🤢. I inherited the NHibernate config file from previous NHibernate test module that was used somewhere before!\nAt the beginning I thought that this is something common when you use NHibernate with rich applications, so I didn’t pay much attention, but then it became a real headache.\nOne of the best colleagues notified me about an important note, which is that I was loading other domain objects from a shared module (which I didn’t really need).\nI checked the NHibernate config file, and removed the mapping line that includes those shared domain objects, and the time shrank to 15 seconds! 🥳\nThe moral of the story is that it’s ok to suspect code we inherit from others, other modules or projects, we might not gain anything by doing that, but I am almost sure that we won’t lose!\n","permalink":"https://emadashi.com/2008/06/suspecting-already-used-code/","summary":"\u003cp\u003eIn one of the modules I am working on, my unit tests used to take tremendous amount of time (4 minutes per test 🤢. I inherited the NHibernate config file from previous NHibernate test module that was used somewhere before!\u003c/p\u003e\n\u003cp\u003eAt the beginning I thought that this is something common when you use NHibernate with rich applications, so I didn’t pay much attention, but then it became a real headache.\u003c/p\u003e","title":"Suspecting already used code"},{"content":"Ok, now I am facing a hard decision; what to do next in my technical life?\nIn order to reach for better decision, I drew a mind map using this wonderful online tool Mindomo, it’s like the following:\nThose nodes are the things I think I want to study/do most.\nI marked the most important ones with the red, yellow and then blue flags. Then marked the ones I need to do most urgently with 1 being the most urgent, 2 less urgent and so on.\nWe use NHibernate at work, it’s interesting technology and very much talked about recently, knowing it in details helps to be more productive and give my experience real credit for it.\nSo I thought about doing some session about it with anyone interested about it here at work (we need to refresh out technical enthusiasm), my plan is to give a brief introduction on it with some samples, then have a longer discussion about it.\nI gave it the highest mark of urgency because we usually are pressured at work and we don’t have the luxury to “sharpen our saws” by having such sessions (I know…don’t look at me like that!). so it takes the first place.\nSecond in place, studying for the ASP.NET exam of Microsoft (which is something really cared about here), and I better take the exam before it’s too late.\nThy cycle goes on clock-wise, till it reaches this charity web application, then I thought why not use this chance of creating web application to learn the “Javascript in depth”, “Ajax”, and “jQuery”?!\nand this is what I will do by god willing.\nIf I want to do that I better commit to what i have just posted, so wish me luck…and if you think you can enjoy open source project, contact me and we might do the charity web application together 🙂\n","permalink":"https://emadashi.com/2008/06/what-is-next-2/","summary":"\u003cp\u003eOk, now I am facing a hard decision; what to do next in my technical life?\u003c/p\u003e\n\u003cp\u003eIn order to reach for better decision, I drew a \u003ca href=\"http://en.wikipedia.org/wiki/Mind_map\"\u003emind map\u003c/a\u003e using this wonderful online tool \u003ca href=\"http://www.mindomo.com/\"\u003eMindomo\u003c/a\u003e, it’s like  the following:\u003c/p\u003e\n\u003cp\u003e\u003ca href=\"http://eashi.files.wordpress.com/2008/06/mostimportant1.jpg\"\u003e\u003cimg loading=\"lazy\" decoding=\"async\" style=\"border-width:0;\" src=\"https://eashi.files.wordpress.com/2008/06/mostimportant-thumb.jpg\" border=\"0\" alt=\"most important\" width=\"527\" height=\"279\" /\u003e\u003c/a\u003e\u003c/p\u003e\n\u003cp\u003eThose nodes are the things I think I want to study/do most.\u003cbr\u003e\nI marked the most important ones with the red, yellow and then blue flags. Then marked the ones I need to do most urgently with 1 being the most urgent, 2 less urgent and so on.\u003c/p\u003e","title":"What is next"},{"content":"In my company, we are working on this big GRP project, lots of pages, projects and workflows, soon we are delivering some modules to the customer.\nSo today, while trying to test a workflow that we have been working for days, something weird happened; the users of the workflow didn\u0026rsquo;t exist anymore!!\nAfter searching for a while, it appeared that we are delivering some modules, and real data needed to be deployed on a database especially for deployment, basically the Users table was the primary table! so as simple as it gets…they created the new database and changed the users we used for the real users (along with the hierarchical structure of the employees).\nOk…that’s fine for now, but the problem is that they wanted us to work on the new data; the action was that they changed the users on the development database on our development environment!\nThat took place with late alert, not only that, but I believe that the change should always start from the development database (not the opposite), notifying all developers of the plan and including them in the change, and only then…the change is reflected to the deployment database.\nThe team I work with was halted for more than half a day, trying to reorganize the users with the proper structure to start the workflow again!\nHow do you handle deployment issues when it comes to real data deployment?\n","permalink":"https://emadashi.com/2008/06/builds-while-deployment/","summary":"\u003cp\u003eIn my company, we are working on this big GRP project, lots of pages, projects and workflows, soon we are delivering some modules to the customer.\u003cbr /\u003e So today, while trying to test a workflow that we have been working for days, something weird happened; the users of the workflow didn\u0026rsquo;t exist anymore!!\u003c/p\u003e\n\u003cp\u003eAfter searching for a while, it appeared that we are delivering some modules, and real data needed to be deployed on a database especially for deployment, basically the Users table was the primary table! so as simple as it gets…they created the new database and changed the users we used for the real users (along with the hierarchical structure of the employees).\u003cbr /\u003e Ok…that’s fine for now, but the problem is that they wanted us to work on the new data; the action was that they changed the users on the development database on our development environment!\u003c/p\u003e","title":"Builds while deployment"},{"content":" I am a software developer, Software Architect, and Consultant with a strong interest in software architecture, software delivery, the cloud, and the human interaction caught in between.\nI help organisations adopt the cloud, build on AI, embrace DevOps, and build modern systems that achieve the right business goals.\nI speak regularly at conferences and user groups, including NDC Sydney, Microsoft Ignite Australia, and community events such as Vic.Net, Azure Meetup, Azure Bootcamps, and Alt.Net in Melbourne.\nI post on https://emadashi.com and can be found on X as @emadashi.\nWhat I Focus On Cloud-native software architecture and delivery AI and agentic systems Cloud adoption and modernisation Development processes, DevOps, and team enablement Previous Talks and Workshops I have spoken at local user groups and large conferences throughout my career. The list below includes a sample of past talks and workshops.\nDevContainers to the Rescue (Melb .NET 2025) Full introduction to Development Containers (DevContainers). You can watch the talk on Youtube.\nOne Step Deeper in Dapr\u0026rsquo;s Pub/Sub (NDC Melbourne 2022) Presented and recorded at NDC Melbourne. A deep dive into Dapr Pub/Sub and how it helps developers build event-driven, resilient systems.\nBuilding Customer Connectors for Azure Logic Apps (Global Integration Bootcamp APAC 2021) Presented live online with Global Integration Bootcamp APAC. Recording available on YouTube.\nRunning Azure Functions on Kubernetes (Integration Down Under) Presented live online on why and how to run Azure Functions on Kubernetes. Recording available on YouTube.\nAzure Self-hosted API Management Gateway (Global Integration Bootcamp 2020) Session covering what the self-hosted API Management Gateway is, when to use it, and how to use it. Recording available on YouTube.\nKEDA: Scale Your Kubernetes Workloads on Your Own Terms (NDC Melbourne 2020) Talk recording on YouTube. Also delivered a hands-on KEDA workshop at NDC Melbourne 2020 (workshop was not recorded).\nRBAC in Azure Kubernetes AKS (Azure Global Bootcamp 2019) A practical session on how RBAC works in AKS, how to set it up, and what happens behind the scenes.\nAm I a Good Developer (NDC Sydney 2019) A lightning talk with guiding questions for becoming a better developer.\nUnderstanding Git (in Arabic) An explanation of how Git works behind the scenes and how it differs from conventional source control systems. Recording available on YouTube.\n","permalink":"https://emadashi.com/about/","summary":"\u003cimg height=\"400\" width=\"400\" src=\"/wp-content/uploads/emad-alashi-photo.jpg\"/\u003e\n\u003cp\u003eI am a software developer, Software Architect, and Consultant with a strong interest in software architecture, software delivery, the cloud, and the human interaction caught in between.\u003c/p\u003e\n\u003cp\u003eI help organisations adopt the cloud, build on AI, embrace DevOps, and build modern systems that achieve the right business goals.\u003c/p\u003e\n\u003cp\u003eI speak regularly at conferences and user groups, including NDC Sydney, Microsoft Ignite Australia, and community events such as Vic.Net, Azure Meetup, Azure Bootcamps, and Alt.Net in Melbourne.\u003c/p\u003e","title":"About Me"}]