Good Performance: Three Developers' Behaviors that Prevent It!

Published Date
20 - Jun - 2016
| Last Updated
20 - Jun - 2016
Good Performance: Three Developers’ Behaviors that Prevent It!

Performance is regarded as one of the most valuable non-functional requirements of an application. If you are reading this, you are probably using an application like a browser or document reader, and understand how important performance is. In this article, I will talk about applications’ good performance and three developers’ behaviors that prevent it.

Behavior #1: Lack of understanding of the development technologies

It doesn’t matter whether you are someone who just graduated from school or have years of experience; when you have to develop something, you will probably look for something that was already developed. Hopefully in the same programming language.

This is not a bad thing. In fact, it often speeds up development. But, on the other hand, it also might prevent you from learning something. Because only rarely does this approach involve taking the time to inspect the code and understand not only the algorithm but also the inner workings of each line of code.

That is one example of us, as developers, falling into behavior number one. But there are other ways too. For example, when I was younger and just starting my journey in software development, my boss at the time was my role model, and whatever he did was the best someone could do. Whenever I had to do something, I looked at how he did it and replicated it as closely as possible. Many times, I did not understand why his approach worked, but who cares, right? It worked!

There is a kind of developer that I call a “4x4.” He or she is someone, who when asked to do something works as hard as possible to complete it. They usually look for building blocks, or pieces of things already done, puts them all together, and “voilà!” The thing is done! Rarely does this kind of developer spend any time understanding all the pieces he or she found and don’t consider or investigate scalability, maintainability, or performance.
There is one more situation that leads to developers not understanding how things actually work: never running into problems! When you use a technology for the first time and you run into problems, you dig into the details of the technology, and you end up understanding how it works.

At this point, let’s look at some examples that will help us understand the difference between understanding the technology and simply using it. Since I am, for the most part, a .NET* web developer, I will focus on that.

JavaScript* and the Document Object Module (DOM)

Let’s look at the code snippet below. Pretty plain. The code just updates the style of an element in the DOM. The problem (which is less of a problem with modern browsers but included to illustrate the point), is that it is traversing the DOM tree three times. If this code is repeated and the document is large and complex, there will be a performance hit in the application.

Fixing such a problem is easy. Look at the following code snipped. There is a direct reference hold in the variable myField prior to working on the object. This new code is less verbose, quicker to read and understand, and has better performance since there is only one access to the DOM tree.

Let’s look at another example. This example was taken from:

In the following figure, there are two equivalent code snippets. Each code creates a thousand list item lielements. The code on the right adds an id attribute to each li element, whereas the code on the left adds a class attribute to each li element.

As you can see, the second part of each code snippet simply accesses each of the thousand li elements that was created. In my benchmarking in Internet Explorer* 10 and Chrome* 48, the average time taken was 57 ms for the code on the left and 9 ms for the code on the right—significantly less. The difference is huge in this case when just accessing the elements in one way or the other.

This example has to be taken very carefully! There are so many additional things to understand that might make this example look wrong, like the order in which the selectors are evaluated, which is from right to left. If you are using jQuery*, read about the DOM context as well. For general CSS Selectors’ performance concepts, see the following article:
Let’s provide a final example in JavaScript code. This example is more related to memory but will help you understand how things really work. High memory consumption in browsers will cause a performance problem as well.

The next image shows two different ways of creating an object with two properties and one method. On the left, the class’s constructor adds the two properties to the object and the additional method is added through the class’s prototype. On the right, the constructor adds the properties and the method at once.

After the objects are created, a thousand objects are created using both techniques. If you compare the memory used by the objects you’ll see differences of memory usage in the Shallow Size and Retained Size for both approaches in Chrome. The prototype approach uses about 20 percent less memory (20 Kbytes versus 24 Kbytes) in the Shallow Size and references up to 66 percent less in Retained Memory (20 Kbytes versus 60 Kbytes).

For a better understanding of how Shallow Size and Retained Size memory work, see:

You can create objects by knowing how to use the technology. But understanding how the technology actually works gives you tools to improve the application in areas like memory management and performance.

When I was preparing my conference presentation on this topic, I wanted to provide an example with server-side code. I decided to use LINQ*, since LINQ has become a first-hand tool in the .NET world for new development and is one of the most promising areas to look for performance improvements.

Consider this common scenario. In the following image there are two functionally equivalent sections of code. The purpose of the code is to list all departments and all courses for each department in a school. In the code titled Select N+1, we list all the departments and for each department list its courses. This means that if there are 100 departments, we will make 1+100 calls to the database.

There are many ways to solve this. One simple approach is shown in the code on the right side of the image. By using the Include method (in this case I am using a hardcoded string for ease in understanding) there will be one single database call in which all the departments and its courses will be brought at once. In this case, when the second foreach loop is executed, all the Courses collections for each department will already be in memory.
Improvements in performance on the order of hundreds of times faster are possible simply by avoiding the Select N+1 problem.
Let’s consider a less obvious example.

In the image below, there is only one difference between the two code snippets: the data type of the target list in the second line. You might ask, what difference does the target type make? When you understand how the technology works, you will realize that the target data type actually defines the exact moment when the query is executed against the database. That, in turn, defines when the filters of each query is applied.

In the case of the Code #1 sample where an IEnumerable is expected, the query is executed right beforeTake<Employee>(10) is executed. This means that if there are 1,000 employees, all of them will be retrieved from the database and then only 10 will be taken.

In the case of the Code #2 sample, the query is executed until Take<Employee>(10) is executed. That is, only 10 records are retrieved from the database.

The following article has an in-depth explanation of the differences in using multiple types of collections.

SQL Server*

In SQL, there are many concepts to understand in order to get the best performance possible out of your database. SQL Server is complex because it requires an understanding of how the data is being used, and what tables are queried the most and by which fields.

Nevertheless, you can still apply some general concepts to improve performance, such as:

  • Clustered versus non-clustered indexes
  • Properly ordered JOINs
  • Understanding when to use #temp tables and variable tables
  • Use of views versus indexed views
  • Use of pre-compiled statements

For the sake of brevity, I won’t provide a specific use case, but these are the types of concepts that you can use, understand, and make the most of.

Mindset Change

So, what are the mindset changes we, as developers, must have in order to avoid behavior #1?

  • Stop thinking “I am a front-end or back-end developer!” You probably are an engineer and you may become an expert in one area, but don’t use that as a shield to avoid learning more about other areas.
  • Stop thinking “Let’s let the expert do it because he’s faster!” In the current world where agile is all over the place, we must be fungible resources, and we must learn about the areas we are weak in.
  • Stop telling yourself “I don’t get it!” Of course! If it was easy then we all would be experts! Spend your time reading, asking, and understanding. It’s not easy, but it pays off by itself.
  • Stop saying “I don’t have time!” OK, I get this one. It does happen. But once an Intel fellow told me “when you are passionate about something, your bandwidth is infinite.” And here I am, writing this article at 12:00 a.m. on a Saturday!

Behavior #2: Bias on specific technologies

I have developed in .NET since version 1.0. I knew every single little detail of how Web Forms worked as well as a lot of the .NET client-side libraries (I customized some of them). When I saw that Model View Controller (MVC) was coming out, I was reluctant to use it because “we didn’t need it.”

I won’t continue with the list of things that I didn’t like at the beginning but now use extensively. But this makes my point of people’s bias against using specific technologies, preventing themselves from getting better performance.

One of the discussions I often hear is either about LINQ-to-Entities in Entity Framework, or about SQL Stored Procedures when querying data. People are so used to one or the other that they try to continue using them.

Another aspect that makes people biased toward a particular technology is whether they are open source lovers or haters. This makes people not think about what is best for their current situation but rather what best aligns to their philosophy.

Sometimes external factors (for instance, deadlines) push us to make decisions. In order to choose the best technology for our applications, we require time to read, play, compare, and conclude. When we start developing a new product or version of an existing product, it’s not uncommon that we are already late. Two ways come to mind on how to solve this situation: stand up and ask for that time or work extra hours to educate ourselves.

Mindset Change

So what are the mindset changes we, as developers, must have in order to avoid behavior #2:

  • Stop saying “This has always worked,” “This is what we have always used,” and so on. We need to identify and use other options, especially if there is data that supports those options.
  • Stop fixing the solution! There are times when people want to use a specific technology that doesn’t provide the expected results. Then they spend hours and hours trying to tweak that technology. What they are doing in this case if “fixing the solution” instead of focusing on the problem and maybe finding a quicker, more elegant solution somewhere else.
  • “I don’t have time!” Of course, we don’t have time to learn or try new stuff. Again, I get this one.

Behavior #3: Not understanding the application’s infrastructure

After we have put a lot of effort into creating the best application, it is time to deploy it! We tested everything. Everything worked beautifully in our machines. All the 10 testers were so happy with it and its performance. So, what could go wrong after all?

Well, everything could go wrong!

  • Did you ask yourself any of the following questions?
  • Was the application expected to work in a load-balanced environment?
  • Is the application going to be hosted in the cloud with many instances of it?
  • How many other applications are running in my target production machine?
  • What else is running on that server? SQL Server? Reporting Services? Some SharePoint* extensions?
  • Where are my end users located? Are they all over the world?
  • How many final users will my application have in the next five years?

I understand that not all of these questions refer to the infrastructure but bear with me here. More often than not, the final conditions under which our application will run are not the same as our staging servers.

Let’s pick come of the possible situations that could affect the performance in our application. We will start with users around the world. Maybe our application is very fast and we hear no complaints from our customers in America, but our customers in Malaysia don’t have the same speedy experience.

There are many options to solve this situation. For one, we could use Content Delivery Networks (CDNs) where we can place static files, then loading pages would be faster from different locations. The following image shows what I am talking about.

Picking another potential situation, let’s consider applications running on servers having SQL Server and Web Server running together. In this case we have two CPU-intensive servers on the same machine. So, how can we solve this? Still assuming you are running a .NET application in an Internet Information Services (IIS) Server, we could take advantage of CPU affinity. CPU affinity ties one process to one or more specific cores in the machine.
For example, let’s say that we have SQL Server and Web Server (IIS) in a machine with four CPUs.

If we leave it to the operating system to determine what CPU uses the IIS or the SQL Server, there could be various setups. We can have two CPUs assigned to each server.

Or we could have all processors assigned to only one server!

In this case, we could fall into deadlock because the IIS might be attending too many requests that took all four processors, and probably some of them will require access to SQL, which, of course, won’t happen. This is admittedly an unlikely scenario, but it illustrates my point.

There is one additional situation: one process will not run on the same CPUs all the time. There will be too much context switching. This context switching will cause performance degradation in the server and then in the applications running on that server.

One way to minimize this is by using processor affinity for IIS and SQL. In this way, we can determine how many processors we need for the SQL

Server and for the IIS. This is done by changing the Processor Affinity settings in the CPU category in the IIS and the “affinity mask” in the SQL server database. Both cases are shown in the following images.

I could continue with other options at the infrastructure level to improve applications’ performance, like the use of Web Gardens and Web Farms.

Mindset Change

What are the mindset changes we, as developers, must have in order to avoid behavior #3?

  • Stop thinking “That is not my job!” We, as engineers, must broaden our knowledge as much as possible in order to provide the best integral solution to our customers.
  • “I don’t have time!” Of course, we never have time. This is the commonality in the mindset change. Making time is what differentiate a professional that succeeds, exceeds, or outstands!

Don’t feel guilty!

But, do not feel guilty! It is not all on you! Really, we don’t have time! We have family, we have hobbies, and we have to rest!
The important thing here is to realize that sometimes there is more to performance than just writing good code. We all have shown and will show some or all of these behaviors during our lifetime.

Let me give you some tips to avoid these behaviors.

1. Make time. When asked for estimates for your projects, make sure you estimate for researching, testing, concluding, and making decisions.

2. Try to create along the way a personal test application. This application will avoid you having to try stuff in the application under development. This is a mistake we all make at some point.

3. Look for people that already know and do pair-programming. Work with your infrastructure person when he or she is deploying the application. This is time well spent.

4. Stack Overflow is evil!!! Actually, I do help there and a big percentage of my problems are already solved there. But, if you use it for “copy and paste” answers, you will end up with incomplete solutions.

5. Stop being the front-end person. Stop being the back-end person too. Become a subject matter expert if you will, but make sure you can hold a smart discussion when talking about the areas where you are not an expert.

6. Help out! This is probably the best way to learn. When you spend time helping people with their problems, you are in the long run saving yourself time by not encountering the same or similar situation

See Also

Funny and interesting blog from Scott Hanselman about being a googler or a developer.

More about objects and prototypes:

About the Author

Alexander García is a computer science engineer from Intel Costa Rica. Alex has over 14 years of professional experience in software engineering.

His professional interests go from software engineering practices, software security, and performance to data mining and related fields.  Alex is currently in the Master’s Degree in Computer Science.

Source: Protection Status


Lighthouse Reef

Lighthouse Reef is an incredible atoll, a coral island encircling a lagoon, in the Caribbean Sea, and was made famous by legendary sea explorer Jacques Cousteau, who rightfully declared it one of the top ten diving locations in the world.

Follow in Cousteau's footsteps by diving in the Great Blue Hole, the underwater sinkhole in the center of the lagoon. Interact with the fauna of the coral reef, including amazing Caribbean reef sharks, Blacktip sharks, barracudas, stingrays, turtles, and hundreds of different fish on a guided or independent dive.

Visit Long Caye, where you can snorkel in the protected lagoons and see the bountiful wildlife, including rare birds, iguanas, and other tropical species. The experience will only be matched by visiting Half Moon Caye, the idyllic island that includes a national park and a bird sanctuary.

You can reach Lighthouse Reef by dive boat or water taxi from Belize City, as well as Caye Caulker and Ambergris Caye. Many snorkeling or diving tours have daily excursions to Lighthouse Reef, highlighting the Great Blue Hole.

If you will be snorkeling or diving, be sure to invest in some high quality water shoes, as walking on the coral reefs can be tricky and potentially painful.

For extended visits, look into resorts on Big Northern Caye and other surrounding areas.

Adresse: Lighthouse Reef, Belize
Mehr lesen
Touren & Aktivitäten (4)
Auswahl löschen
Sortieren nach:Standard

Empfohlen für Belize City

Haben Sie Probleme bei der Online-Buchung?
0800 184 4973
0800 184 4973 anrufen


Berlin Botanical Garden and Botanical Museum

The Berlin Botanical Garden is about 126 acres, making it one of the world's largest botanical gardens, and it has approximately 22,000 types of plants. In the 39-acre plant-geography section, you can see plants from all over the northern hemisphere. There is also a 42-acre Arboretum and taxonomy section where you can learn about woody and herbaceous plants. The greenhouse complex consists of 16 houses where visitors can wander through tropical and subtropical vegetation.

In the botanical museum, you can see enlarged scale models of structures that are normally too small to be seen by the naked eye. There are also sections where you can view entire habitats through glass. The museum also has plants on display all year that can only be seen for a few weeks or even a single day in the garden. There is also a library of botanical books in the museum.

The Berlin Botanical Garden and Museum is a great place to learn about plants from all around the world, but it's also an escape from the noise and bustle of the city. It's also a nice place to escape the cold if you're visiting during the winter.

Practical Info

The Berlin Botanical Garden and Museum is located at Königin-Luise-Straße 6-8. The museum is open daily from 10am to 6pm. The garden opens daily at 9am and closes between 4pm and 9pm depending on the time of year.
Adres: Königin-Luise-Straße 6-8, Berlin, Germany, Duitsland
Openingstijden: Daily 10am-6pm
Toegang: €6
Meer lezen
Tours en activiteiten (2)
Alles wissen
Sorteren op:Standaard

Is het niet mogelijk om online te boeken?
+31 85 888 1845
Bel naar +31 85 888 1845


Indian Brahmos Missile test hits bullseye at speed MACH 2.9+

Rating is available when the video has been rented.
Published on May 16, 2010

BrahMos is a supersonic cruise missile that can be launched from submarines, ships, aircraft or land. It is a joint venture between India's Defence Research and Development Organisation (DRDO) and Russia's NPO Mashinostroeyenia who have together formed BrahMos Aerospace Private Limited.

BrahMos missile is perceived as the confluence of the two nations represented by two rivers, the Brahmaputra of India and the Moskva of Russia. It travels at speeds of Mach 2.5 to 2.8

BrahMos missile claims to have the capability of attacking surface targets as low as 10 meters in altitude. It can gain a speed of Mach 2.8, and has a maximum range of 290 km. The ship-launched and land-based missiles can carry a 200 kg warhead, whereas the aircraft-launched variant (BrahMos A) can carry a 300 kg warhead. It has a two-stage propulsion system, with a solid-propellant rocket for initial acceleration and a liquid-fueled ramjet responsible for sustained supersonic cruise. Air-breathing ramjet propulsion is much more fuel-efficient than rocket propulsion, giving the BrahMos missile a longer range than a pure rocket-powered missile would achieve.

The high speed of the BrahMos supersonic cruise missile likely gives it better target-penetration characteristics than lighter subsonic cruise-missiles such as the Tomahawk. Being twice as heavy and almost four times faster than the Tomahawk, the BrahMos missile has almost 32 times the initial kinetic energy of a Tomahawk missile (although it pays for this by having only 3/5 the payload and a fraction of the range despite weighing twice as much, suggesting a different tactical paradigm to achieve the objective).

he army has raised one regiment (numbered 861) of the BrahMos missile Mark I. Now two separate missile regiments of the BrahMos Mark II, which has a seeker that can discriminate and zero in on a small target in an urban clutter, will be raised and are likely to be numbered 862 and 863. Each of the two new BrahMos cruise missile regiments would have between four and six batteries of three to four Mobile Autonomous Launchers that can be connected to a general mobile command post

Up next

to add this to Watch Later

Add to

Loading playlists...


Picture of David KaufmanAbout

The Beatles may have inspired David Kaufman (a.k.a. Mr. Beatle) to pursue a life of music-making but his career is distinguished more than anything by its astonishing range of creative activity. He's no one trick pony!

David’s musical journey began at the age of nine with a 10-hole harmonica. His sixth grade classroom recorded a vinyl album (“What Color is Love?”) of the kids singing multi-cultural songs of the day. At 13, he learned to read music and took up the trumpet, which he played in orchestra, jazz band, and marching band from junior high all the way through college.

David picked up a little piano here, a little bass there but, inevitably, it was David’s emerging talents as a guitarist, vocalist, and songwriter that would become his main focus. Soon he was singing and strumming in all kinds of bands: original, top-40, oldies-but-goodies, country, and yes, Beatles tribute bands. He has performed throughout the United States, including high-profile Beatle gigs at the famous Greek Theatre in L.A. and the Pistons Palace in Detroit. He has also performed in Canada and Mexico.

David has delivered singing telegrams (with a range of characters including both Gorilla-Gram and Banana-Gram), acted in musical theater, entertained in more than 150 senior citizen facilities, spent four years playing music for pre-schools and daycare centers, and is a solo vocalist at least twice a month in churches.

David has written, recorded, and produced six CDs of his own original material and produced recordings for other artists as well. He has been a vocalist and guitarist on hundreds of sessions and done music transcriptions of over 6,000 songs by other artists.

David takes pride in nurturing the talents of other musicians as a patient and articulate guitar teacher and by hosting (since 2011) a singer/songwriter open mic night in Burbank.

If his musical career wasn't enough, David has also appeared in several independent films and written, performed, and produced three long-form, spoken-word shows. He has performed short-form comic/dramatic monologs at various storytelling venues, including Story Salon, for whom he composed a theme song.

Why is music important to David? “Every song is a unique nugget of energy.”


[FAQ] • [doc]
Weak survivalist's potion detail

A Weak survivalist's potion is a one dose potion made in the Dungeoneering skill. It is made by adding Valerian and Firebreath whiskey to a Vial of water. This requires level 33 Herblore and grants 75 experience in Herblore. Drinking the potion boosts a player's Agility, Hunter, Thieving and Slayer by 3 levels plus 2% of the current level in that skill. The boost is just 3 for skills under level 50, and from 50 upwards the boost is 4.

Weak survivalist's potion Weak survivalist's potion
Herblore-Make-X GE icon
75 XP--
Herblore Herblore level33
P2P icon Members onlyYes
Clean valerianClean valerian1N/A-
Firebreath whiskeyFirebreath whiskey1N/A-


Unknown Blockhouse

Harmon AFB Hanger

Harmon AFB Bunker

I did.

Rose Blanche Lighthouse

Rose Blanche Fish Plant

Rose Blanche Pumphouse

Out for a drive, exploring the area along the south coast of Newfoundland, I spotted a rooftop of a small building peeking out from the bushes.  I simply had to stop for a look.

As I pushed through the overgrowth, I was happy to see that, not only was the door open, but that there was some interesting stuff inside to see and show you.

Redcliff AFS

The location on which the radar station was constructed was originally a World War II coastal battery. Construction of the site began in 1952, and was completed the following year when it officially began operations. It was built, financed and operated by the United States Air Force during its complete life-span of 9 years.

NAS Argentia

Construction of Naval Air Station (NAS) Argentia began on January 25, 1941 and was completed that July. In order to build this base in anticipation of the US's involvement in World War II, over 400 families were displaced from the land by the Government of Newfoundland. While they had been paid for their property, they were uprooted from land on which generations before them had lived, and moved into other communities that were already struggling with the population they had.


What are Europe's synagogues currently being used as?

Guy Cohen,

Over three thousand historic synagogues are still standing in Russia and Europe, but over 75% of them no longer serve their original purpose.

Prior to World War II, there were 17,000 synagogues in Russia and Europe. Today, only 850 of those remain in use as houses of prayer.

A new interactive map from the Foundation for Jewish Heritage shows the locations of 3,318 buildings constructed as synagogues, and allows users to filter the results to see only those currently serving as synagogues.

Other filters allow users to view which synagogues were turned into sports arenas, bathhouses, police stations, restaurants, and more. Several synagogues in England, Holland, and Bulgaria were turned into mosques, and one English synagogue was turned into a Sikh house of prayer.

A synagogue in Poznań, Poland, currently serves as a swimming pool, and seven synagogues in Ukraine, Poland, and Germany are now used as banks. Other synagogues serve as storerooms or firefighting stations.

The map also includes synagogues which existed in Spain before the Inquisition. Only four of those buildings currently serve as synagogues.

Founded in 2015, the Foundation for Jewish Heritage aims to preserve European synagogues. The map aims, among other things, to help potential donors decide where to invest in renovating or preserving historical synagogues.

Approximately 160 of the synagogues have deteriorated to where it will not be possible to preserve them if the money to do so does not appear soon.


hexadecimal notes By ZAK

50 %
50 %
Information about hexadecimal notes By ZAK

Published on September 29, 2015

Author: 34GL3

Source: slideshare.net

1. Page 1 of 7 1.1 Data representation 1.1.2 HEXADECIMAL NUMBER SYSTEM The one main disadvantage of binary numbers is that the binary string equivalent of a large decimal base-10 number can be quite long. When working with large digital systems, such as computers, it is common to find binary numbers consisting of 8, 16 and even 32 digits which makes it difficult to both read and write without producing errors especially when working with lots of 16 or 32-bit binary numbers. One common way of overcoming this problem is to arrange the binary numbers into groups or sets of four bits (4-bits). These groups of 4-bits uses another type of numbering system also commonly used in computer and digital systems called Hexadecimal Numbers. REPRESENTING INTERGERS AS HEXADECIMAL NUMBERS: The base 16 notational system for representing real numbers. The digits used to represent numbers using hexadecimal notation are 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, and F. “H” denotes hex prefix. Examples: 2816 = 28H = 2×161 +8×160 = 40 2F16 = 2FH = 2×161 +15×160 = 47 BC1216 = BC12H = 11×163 +12×162 +1×161 +2×160 = 48146 1.1.2 Hexadecimal

2. Page 2 of 7 1.1 Data representation Numeral systems conversion table: 1.1.2 Hexadecimal

3. Page 3 of 7 1.1 Data representation WHY USE HEXADECIMAL NUMBER SYSTEMS? The main reason why we use hexadecimal numbers is because it is much easier to express binary number representations in hex than it is in any other base number system. Computers do not actually work in hex (don’t laugh, beginning students do ask that question). Let’s look at an example, using a byte. Bytes are typically 8 bits, and can store the values 0 – 255 (0000 0000 – 1111 1111 in binary). For people, expressing numbers in binary is not convenient. I am not going to turn around to my co-worker and tell him that my phone number is 101 101 101 001 010 001 010 for obvious reasons. Imagine having to try and work with that on a daily basis. So a more convenient expression is needed for the humans. Since a byte is 8 bits, it makes sense to divide that up into two groups, the top 4 bits and the low 4 bits. Since 4 bits gives you the possible range from 0 – 15, a base 16 system is easier to work with, especially if you are only familiar with alphanumeric characters. It’s easier to express a binary value to another person as “A” then it is to express it as “1010”. This way I can simply use 2 hex values to represent a byte and have it work cleanly. This way even if my math is poor, I only need to memorize the multiplication tables up to 15. So if I have a hex value of “CE”, I can easily determine that 12 * 14 = 206 in decimal, and can easily write it out in binary as 1100 1110. Trying to convert from binary would require me to know what each place holder represents, and add all the values together (128 + 64 + 8 + 4 + 2 = 206). It’s much easier to work with binary through hex than any other base system. CONVERSION TECHNIQUES: HEXADECIMAL TO BINARY AND BINARY TO HEXADECIMAL NUMBER SYSTEM: Let’s assume we have a binary number of: 01010111 Hexadecimal =?? 8 4 2 1 8 4 2 1 0 1 0 1 0 1 1 1 0x8 1x4 0x2 1x1 0x8 1x4 1x2 1x1 0 4 0 1 0 4 2 1 0+4+0+1=5 0+4+2+1=7 5 7 Hence the hexadecimal equivalent is 57 1.1.2 Hexadecimal

4. Page 4 of 7 1.1 Data representation From Denary to Hexadecimal: 117 (in denary) is 7 lots of 16 (112) plus an extra 5. Fitting this in the columns gives 256 16 1 0 7 5 Notice that 7 in binary is 0111 and that 5 is 0101, put them together and we get 01110101 which is the binary value of 117 again. So binary and hexadecimal are all related in some way. FROM HEXADECIMAL TO BINARY AND DENARY: Hexadecimal number BD stands for 11 lots of 16 and 13 units = 176 + 13 = 189 (in denary) Note: B = 11, which in binary = 1011 D = 13, which in binary = 1101 Put them together to get 10111101 = the binary value of 189. USE OF HEXADECIMAL NUMBER IN COMPUTER REGISTERS AND MAIN MEMORY: Computers are comprised of chips, registers, transistors, resistors, processors, traces, and all kinds of things. To get the binary bits from one place to the next, software programmers convert binary to hex and move hex values around. In reality, the computer is still shoving 1's and 0's along the traces to the chips. There are two important aspects to the beauty of using Hexadecimal with computers: First, it can represent 16-bit words in only four Hex digits, or 8-bit bytes in just two; thus, by using a numeration with more symbols, it is both easier to work with (saving paper and screen space) and makes it possible to understand some of the vast streams of data inside a computer merely by looking at the Hex output. This is why programs such as DEBUG, use only Hexadecimal to display the actual Binary bytes of a Memory Dump rather than a huge number of ones and zeros! 1.1.2 Hexadecimal

5. Page 5 of 7 1.1 Data representation The second aspect is closely related: Whenever it is necessary to convert the Hex representation back into the actual Binary bits, the process is simple enough to be done in your own mind. For example, FAD7 hex is 1111 1010 1101 0111 (F=1111, A=1010, D=1101, 7=0111) in Binary. The reason one might wish to do this is in order to work with "logical" (AND, OR or XOR) or "bit-oriented" instructions (Bit tests, etc.) which may make it easier (at times) for a programmer to comprehend. For example, if you wanted to logically AND the hex number FAD7 with D37E, you might have a difficult time without first changing these numbers into Binary. If you jot them out in Binary on scratch paper, the task will be much easier: FAD7(hex) 1 1 1 1 1 0 1 0 1 1 0 1 0 1 1 1 D37E(hex) 1 1 0 1 0 0 1 1 0 1 1 1 1 1 1 0 ANDing gives 1 1 0 1 0 0 1 0 0 1 0 1 0 1 1 0 Answer (in hex) D 2 5 6 USES OF HEXADECIMAL IN COMPUTING: Along with the advances in Microcomputers, "the Internet" has experienced many changes as well. A code still used by "Web browsers" today had been invented to transfer information from servers to terminals in a way that made the Internet a much more effective tool for research. That code is called "Hyper-Text Markup Language" (or HTML) and it soon included a method which could theoretically reproduce background and text with a total of 16,777,216 different colors! The hardware available today has already advanced way beyond that limit. The main reason was a push to display pictures "in living color;" now a common reality. And one of the first things a new computer user should always do is make sure their display can be set to what's called "24-bit" or "True Color" (for those 16- million plus possible colors). As a matter of fact, almost every video card today has the capacity to reproduce what's called "32-bit" color. But all those extra bits are not used for increasing the number of colors! Why? Well, since the human eye is only capable of distinguishing something like 7 million or so different colors that would be a real waste of technology! But you'll have to look for another page about video cards if you want to know more; our task here is to simply explain the use of color with HTML code. 1.1.2 Hexadecimal

6. Page 6 of 7 1.1 Data representation Soon there were two very typical lines of HTML code being used to create background colors:  for an all-white background And  for a light-gray background As a matter of fact, some browsers display an all-white background as their default (when no color is given) whereas others use a light-gray color to display such backgrounds. And "#000000" is used to make pages with an all-black background. The three PRIMARY colors (RED, GREEN and BLUE) were each assigned TWO HEXADECIMAL DIGITS within this six-digit hexadecimal number: Each of the component colors (R-G-B) can, therefore, contribute a maximum of 256 different shades (zero through 255) to the final appearance of the background or text color. Here's a list which shows how easy it is to make six basic colors. The lines shown here contain the HTML "tag" pairs on either side of the TEXT color they create. (For those who may have a problem seeing one or more of the colors, the name also appears at the end of each line in parentheses): HTML TAG Name RED (RED) GREEN(GREEN) LIME BLUE (BLUE) YELLOW(YELLOW) VIOLET(VIOLET) FUCHSIA CYAN (CYAN) AQUA You can now see that YELLOW is really a combination of Red and Green. When you combine Red and Blue it makes Violet (FUCHSIA), and displaying Green and Blue together causes the eye to see CYAN (AQUA). Other colors are formed by limiting the intensity of one or more of the three Primary Colors. E.g., cutting the values for the Green and Blue of Cyan in half gives you the default color for the MS-Windows™ 98 Desktop called TEAL (color = "#007F7F" ). [Note: Although you'll often see the word "Green" as the name for the Primary Color represented by "#00FF00" above, when it came time to assign the names of colors to HTML "tags" for Netscape's browser, they ended up calling this color "Lime" and assigned the name Green to half the full value: either "#007F00" (or "#008000").] 1.1.2 Hexadecimal

7. Page 7 of 7 1.1 Data representation For some reason when the first web browsers (including Netscape) were made, even though video cards used what was called VGA and could reproduce 256 different colors, some of those colors were not compatible with the web browsers! Later browsers, such as Microsoft's series, could handle all 256 colors. Rather than have their webpages possibly look bad for some people, many commercial HTML authors still use a subset of the 256 colors which are called "Browser Safe" or just "Safety" colors. There are FOUR different webpages here which contain SAMPLES of all 216 colors in this "safety palette." Each consists of a large table that shows either the Hexadecimal Code or the R-G-B Notation for each color on a page with either a Black or a White background. 1.1.2 Hexadecimal

Add a comment

Related pages

note 5029 deleted from rawurlencode by zak - Grokbase

If those

are followed by any characters that may be interpreted as a hexadecimal ... from rawurlencode by zak; note 10611 deleted from ...
Read more

Hexadecimals | BSSBMI

D. convert positive hexadecimal integers to and from binary. ... G. show understanding of the reasons for choosing Hexadecimal to represent numbers. ZAK Notes.
Read more

Download Elite Converter - A simple MFC application that ...

Might I note the side effects of ... A simple MFC application that converts ASCII characters to their hexadecimal, ... Elite Converter by Zak Farrinton ...
Read more

MQSeries Application Programming Reference

Notes: For constants with numeric values, the values are shown in both decimal and hexadecimal forms.
Read more

Print hexadecimal in Assembly - Experts Exchange - The ...

How to print on screen hexadecimal value in Assembly language? E.g. if BX contains 55FFh how can it be printed on screen like 55FF ?
Read more

Emacs Rainbow Mode — Current Flow - Nathan Campos

Emacs Rainbow Mode These things make me love to develop with Emacs ... (hexadecimal numbers, ... Observer theme by Zack Sultan ...
Read more

whats a hexadecimal? | Yahoo Answers

(Note that we're using "16" here as a decimal number to explain a number ... Two hexadecimal digits can represent eight ... zack · 9 years ago . 0.
Read more

Zak-Chakan, Mexico free weather widget | Weather Plugin ...

Zak-Chakan, Mexico - Free Weather Widget for your website, wordpress and CMS
Read more

Color Theory in Digital Media - UNM Continuing Education ...

Learn the differences and applications for Pantone, CMYK, RGB, Hexadecimal colors, ... Section FAA-PFA By Zac Van Note: 56123 InDesign: Advanced, ...
Read more


The discovery of niobium tungsten oxides raises the possibility of developing a smart phone battery that could be fully charged in minutes. Photograph: Santi Palacios/AP

Cheap material could radically improve battery charging speed, say scientists

Discovery could accelerate adoption of electric cars and solar energy, as well as helping to recharge your smartphone in minutes

A newly identified group of materials could help recharge batteries faster, raising the possibility of smartphones that charge fully in minutes and accelerating the adoption of major clean technologies like electric cars and solar energy, say researchers.

The speed at which a battery can be charged depends partly upon the rate at which positively charged particles, called lithium ions, can move towards a negatively charged electrode where they are then stored. A limiting factor in making “super” batteries that charge rapidly is the speed at which these lithium ions migrate, usually through ceramic materials.

One potential solution is to make everything much smaller, by making batteries with nanoparticles. But nanoparticles are expensive and tricky to make and so scientists have been searching for alternative materials to circumvent this problem.

Now, researchers at the University of Cambridge have identified a group of materials called niobium tungsten oxides through which lithium ions can move at astonishingly high rates, meaning much faster charging batteries.

“Niobium tungsten oxides are fundamentally different,” said Kent Griffith, first author on the study published in the journal Nature. First discovered in 1965, these materials have a rigid, open structure and have larger particle sizes than many other materials commonly used in batteries.

To measure the movement of the lithium ions through these unusual materials, the researchers used a technology similar to that found in an MRI scanner. They found that the lithium ions were moving through their test materials hundreds of times faster than they would through typical ceramic electrode materials.

Another advantage of these alternative materials is that they are cheap and straightforward to make. “These oxides are easy to make and don’t require additional chemicals or solvents,” said Griffith.

Electric cars and grid-scale storage for solar power are two environmentally friendly technologies that could be revolutionised by better batteries.

Clare Grey, professor of materials chemistry at the University of Cambridge and senior author on the paper, said the next step will be to optimise the use of this material in a full battery, which can be cycled for the time and length needed for electric vehicles. “For example, electric buses where you may want to charge the bus very fast at the bus stop,” she added.

“The discovery is very exciting in terms of what it does for battery performance,” said Dan Brett, professor of electrochemical engineering at University College London, who was not involved in the work. “The really clever thing about the work is the insight into the mechanism and ability to measure how fast the lithium ions travel through the material.”

Brett added: “This technique will also allow these materials to be further optimised, so we can look forward to future improvements in [battery] power, energy and lifetime.”


Test your basic knowledge |

CLEP American Government

Subjects : clep, civics
  • Answer 50 questions in 15 minutes.
  • Match each statement with the correct term.

1. According to this nineteenth-century British peer and historian - 'power tends to corrupt and absolute power corrupts absolutely.'

2. The state officer typically responsible for overseeing federal elections at the state level is the

3. A philosophy that the Supreme Court should avoid constitutional questions when possible and uphold acts of Congress unless they clearly violate a specific section of the Constitution.

4. If 10 days do not remain in session and the president does not sign an act of Congress - the bill __________.

5. The right to privacy is ___________ in the Constitution.

6. Several Presidents have been elected without winning the popular vote. As a result - In 1970 and 1979 - Amendments were proposed to disband the ______________ - neither passed.

7. The vagueness of this phrase has allowed juries to exclude specific genders or races in order to affect the outcome of the verdict.

8. In 1943 - The Supreme Court upheld the Jehovah's Witnesses right to refrain from saluting the American flag based on their right to _____________.

9. Test whereby the Supreme Court established criteria by which state may provide aid to religious groups.

10. The name commonly given to a private group - regardless of size - organized to elect political candidates. An organization becomes one by receiving contributions or making expenditures in excess of $1 -000 for the purpose of influencing a federal ele

11. The average voter turnout between 1960 and 2004 was __________ percent

12. Finding that enough evidence exists to warrant a criminal trial.

13. A political candidate who is thought to have only an outside chance of gaining the nomination.

14. A group of people - chosen by poll-takers - that is representative of the universe that is being polled.

15. Contacts - coalitions - and interactions across national boundaries

16. Independent agencies governed by an appointed and confirmed commission. Examples include the Food and Drug Administration - Environmental Protection Agency - and the Securities and Exchange Commission.

17. The pursuit and exercise of power.

18. This may be done by a national constitutional convention called by Congress on the request of two-thirds of the state legislatures OR By the passage of a two-thirds vote in both houses of Congress

19. The ___________ aspects of Federalism include: diversity/diffusion of power - more access points for political participation - fostering of experimentation and innovation - and allowing local governments to manage local problems effectively

20. (1781-1789) The written framework for the government of the original 13 states before the Constitution was adopted. Under this - the national government was weak and dominated by the states. There was a unicameral legislature - but no national execut

21. The strongest factor contributing to an individual's political socialization tends to be

22. The Supremacy Clause appears in ________________ of the Constitution.

23. These voters tend to have a high voter turnout because of their strong since of civic duty due to growing up during an era of political and civil unrest.

24. The introductory statement of the U.S. Constitution - setting forth the general principles of American government and beginning with the words - 'We the people of the United States - in order to form a more perfect union. ...'

25. In this case - a gay man from Georgia charged with committing sodomy in his own home with a consenting adult. The court ruled that the Constitution does not explicitly grant the right for homosexuals to practice their lifestyle and that laws against

26. The agency that provides Congress with evaluations of public policies is the

27. In Johnson v. Texas (1989) - the Supreme Court ruled that burning the flag in a manner that does not pose a threat to people or property is allowed as this type of freedom of speech.

28. Each Senate committee may have ________ subcommittees.

29. Government regulation of the economy through its control over taxes and government spending. Controlled by the Department of Treasury.

30. The Voting Rights Act of 1965 required states in the covered jurisdiction to attain _________________ from the Attorney General before making changes to voting standards - practice - or procedure

31. The response of the rest of society to actions by the authorities.

32. 1798 Act that criminalized speech that was derisive to the government. Later ruled unconstitutional - Andrew Jackson issued blanket pardon in 1801

33. A pluralist theory by C. Wright Mills where a small number of wealthy elite wield most of the power. Fundamental to all governments around the world - the elite rule while they make the lower classes feel like they are involved in democracy. The elit

34. Wisconsin Republican who exploited public concern for political gain during the 1950's through freewheeling investigations of alleged Communists.

35. Literally meaning 'right of blood' - confers citizenship to a child from the parents.

36. Multi-interest and often multinational corporations that - under one corporate roof - may manufacture a wide variety of products.

37. ____________________ define Congressional voting districts acting within constraints set down by Congress and the Supreme Court.

38. A system in which the power to govern is shared between national and state governments

39. Method by which federal court judges may lose their position.

40. ________________ of the Constitution governs the relationships of the states.

41. Number of Federal District courts across 50 states - DC and Puerto Rico.

42. A joint committee of Congress established to help negotiate discrepancies and gain consensus between legislation passed in each house before sending the bill to the President.

43. Elections in which the majority party (according to party identification) is defeated in a temporary reversal.

44. Belief in the value of strong government to provide economic secruity and protection for civil rights - combined with a belief in personal freedom from government intervention in social conduct

45. ___________ vote in both the House and Senate may override a Presidential veto of legislation.

46. A policy that takes something away from one person and gives it to someone else -

47. An election in which voters in a jurisdiction select candidates for a subsequent election. In other words - one means by which a political party nominate candidates for the following general election.s

48. The party-column ballot - or Indiana ballot - encourages _______________.

49. Important during the Revolution - these bodies organized by the local governments of the Thirteen Colonies during the American Revolution for the purposes of coordinating written communication outside of the colony.

50. Grants that an accused may not be held in custody without charge - literally 'You shall have the body'.


LOOTERA. Director: Vikramaditya Motwane. Players: Ranveer Singh, Sonakshi Sinha, Adil Hussain, Barun Chanda, Arif Zakaria. Music: Amit Trivedi. Theatrical release (Balaji). Hindi with English sub-titles.

The most unusual aspect of Motwane’s carefully-made Lootera may well be that it is that rare Hindi movie that actually discloses the origin of the storyline—in this case fully crediting American writer O. Henry’s bittersweet 1907 short-story The Last Leaf as the screenplay’s basis. Sticking to O. Henry’s theme of stormy relationships lived through accidental encounters and anchored by an unusual romance, Motwane and team juggle the right balance of stagecraft, story-telling and setting to give unexpected flight to  Lootera.

Set in rural Bengal in early 1950s, the vast holdings of prominent land-owner Zamindar Roychoudhary (Chanda) are under increasing threats from zealous civil servants salivating at the prospect of confiscating Roychoudhary’s property by cashing in on a newly democratic nation’s wealth-redistribution efforts. The arrival of an archeologist Varun Srivastav (Singh), keen on digging up an ancient temple on the premises, provides a distraction for Roychoudhary and also his educated, ambitious and yet tradition-bound daughter Pakhi (Sinha). Just as Pakhi and Varun get drawn together, Varun suddenly disappears, setting in play a monumental journey for everyone involved.

In Pakhi’s challenging role, Sinha makes a convincing transition from spoiled, educated doyen of the mansion to a stronger woman who has to fend for herself. Hussain as the determining cop who goes looking for Varun, Zakaria as Varun’s possibly-nefarious benefactor and Chanda as a land baron oblivious to encroaching storms about to engulf his fiefdom provide solid support to the story.  Indiana-educated Singh, who, like Sinha, is a relative newcomer, demonstrates maturity and reinforces his up-and-coming creds.

Taken on merit, the set designs and costumes beautifully invoke a period piece firmly set in the early 1950s—full-cut pants and pencil thin mustaches on the men and high neck blouses and saris for the women. The time-period sensitive outline extends to the use of rotary phones and news headlines, along with movie scores from that era. Trivedi, when he teams up with lyricist Amitabh Bhattacharya, banks on an earthy musical style, which of late they have tapped into to compose some catchy scores (Kai Po Chhe, Udaan, English Vinglish). The singing here is all in the background and not lip-synched. The standout tune is Monali Thakur’s “Sawaar Loon,” an ode to a new awakening in all its senses.

As the narrative moves from Bengal’s backwoods to Dalhousie, in Himalayan foot-hills, Mahendra Shetty’s cinematography makes a striking case for snow covered terrain and one recurring tree that figures prominently in the story. Even though some scenes involving the tree appear repetitious—a desi Groundhogs Day—a screenplay co-written by Motwane and Bhavna Iyer, move the lazy afternoon tete-a-tetes between Varun and Pakhi into an exchange that is both sensual and poetic.

Summertime Hindi movies thrive on lively, upbeat stories marketed for coinciding with long awaited summer vacations where movie-goers make a dash for the cool interiors of multiplexes to escape both the stifling heat and a monsoon torrent or two. On that calendar, Lootera would seem way, way out of place. And yet, the movie’s parched, dry lowland vistas and stoic, ominous alpine winterscapes cast a magical spell replete with promises in danger of not being kept, backward glances, of loves and lovers gone by and a toast with the last of the summer wine. For so carefully plotting the anticipation on when—or even if—the last leaf will fall, Motwane and company virtually and effectively weaponize romance.

…You Are Our Business Model!