Home Inspection and Its Powerful Benefits

A celebration is typically in order when you finally get to buy that dream house of yours. It’s a huge prize and achievement after so much hard work and saving. But, what if you open that door only to see occasional power surges and broken pipes?

Opening your doors to those things is the most horrible way to start that next phase of your life. One way you can prevent those things from happening is through a home inspection.

Doing a home inspection is an excellent way to find problems that you didn’t get to see during your first visit to the property. By doing a home inspection prior to making a purchase, you’ll be saving yourself tons of headaches, frustrations and the high cost of repair.

Still not convinced? Here are some home inspection benefits you should know about.

Peace of Mind

home inspection

When we notice something out of place, it bothers us and makes us want to know what’s making us uneasy. A home inspection is one way of understanding that kind of problem.

See Also: 10 Important Home Features That Home Buyers Want

Safety

One of the main reasons you buy a house is for safety. It can protect you and your loved ones from the weather, dangerous elements, and other things that can compromise your safety. Doing an inspection can and will provide the security you need, like preventing personal injuries from happening.

A slight power surge may mean that some wirings are rotting or rats have begun chewing on the wires. You can already consider that as a fire hazard, and lots of tragic stories have been born from that.

Water dripping from the ceiling can be solved temporarily by a bucket, but what if it becomes full and turns into a slipping hazard? Never underestimate what a simple home inspection can do.

Savings

home inspection savings

A lot of homeowners disregard home inspection due to its cost. This way of thinking should be completely changed if you want to save a vast fortune. Knowing what needs repairs or fixing as soon as possible can prevent disasters, not only physically, but financially as well.

Having to face an abysmal ton of repairs in the future is a real headache. With home inspection, you can sort out what needs to be fixed immediately to prevent it from causing, even more, problems.

Why wait for that rusty and leaky pipe to fall and break that expensive bath tub upstairs? Why wait for that wire to burn down the house when you can change that wire for a small fee?

A home inspection can save you from that headache and that financial drawback that you were so desperately afraid of in the first place.

See Also: Warning: 7 Home Inspection Pitfalls That Can Cost You A Fortune

Takeaway

It’s normal for people to feel euphoric when they get to purchase their dream house. Because of the overwhelming emotions, they can inadvertently skip home inspection. They tend to disregard the idea, thinking that newer properties are impossible to have defects and damages.

Home inspection can provide us with a more comfortable life in the long run. From significant savings to saving the entire house we own, early assessment of our property is the next best thing we can do after popping that bottle of champagne.

The post Home Inspection and Its Powerful Benefits appeared first on Dumb Little Man.


via Dumb Little Man – Tips for Life
Home Inspection and Its Powerful Benefits

InnoDB Page Merging and Page Splitting

Page Merging and Page Splitting

If you met one of the (few) MySQL consultants around the globe and asked him/her to review your queries and/or schemas, I am sure that he/she would tell you something regarding the importance of good primary key(s) design. Especially in the case of InnoDB, I’m sure they started to explain to you about index merges and page splits. These two notions are closely related to performance, and you should take this relationship into consideration when designing any index (not just PKs).

That may sound like mumbo jumbo to you, and you may be right. This is not easy stuff, especially when talking about internals. This is not something you deal with on a regular basis, and often you don’t want to deal with it at all.

But sometimes it’s a necessity. If so, this article is for you.

In this article, I want to shed some light in explaining some of the most unclear, behind the scenes operations in InnoDB: page index creation, page merging and page splitting.

In Innodb all data is an index. You’ve probably heard that as well right? But what exactly does that mean?

File-Table Components

Let’s say you have MySQL installed, the latest 5.7 version (Percona Server for MySQL, right? 😉 ), and you have a table named wmills in the schema windmills. In the data directory (normally /var/lib/mysql/) you will see that it contains:

data/
  windmills/
      wmills.ibd
      wmills.frm

This is because the parameter innodb_file_per_table is set to 1 since MySQL 5.6. With that setting, each table in your schema is represented by one file (or many files if the table is partitioned).

What is important here is that the physical container is a file named wmills.ibd. This file is broken up into and contains N number of segments. Each segment is associated with an index.

While a file’s dimensions do not shrink with row-deletions, a segment itself can grow or shrink in relation to a sub-element named extent. An extent can only exist inside a segment and has a fixed dimension of 1MB (in the case of default page size). A page is a sub-element of an extent and has a default size of 16KB.

Given that, an extent can contain a maximum of 64 pages. A page can contain two to N number of rows. The number of rows a page can contain is related to the size of the row, as defined by your table schema. There is a rule within InnoDB that says, at minimum, two rows must fit into a page. Therefore, we have a row-size limit of 8000 bytes.

If you think this sounds like Matryoshka dolls, you are right! An image might help:

InnoDB uses B-trees to organize your data inside pages across extents, within segments.

Roots, Branches, and Leaves

Each page (leaf) contains 2-N rows(s) organized by the primary key. The tree has special pages to manage the different branch(es). These are known as internal nodes (INodes).

This image is just an example, and is not indicative of the real-world output below.

Let’s see the details:

ROOT NODE #3: 4 records, 68 bytes
 NODE POINTER RECORD ≥ (id=2) → #197
 INTERNAL NODE #197: 464 records, 7888 bytes
 NODE POINTER RECORD ≥ (id=2) → #5
 LEAF NODE #5: 57 records, 7524 bytes
 RECORD: (id=2) → (uuid="884e471c-0e82-11e7-8bf6-08002734ed50", millid=139, kwatts_s=1956, date="2017-05-01", location="For beauty's pattern to succeeding men.Yet do thy", active=1, time="2017-03-21 22:05:45", strrecordtype="Wit")

Below is the table structure:

CREATE TABLE `wmills` (
  `id` bigint(11) NOT NULL AUTO_INCREMENT,
  `uuid` char(36) COLLATE utf8_bin NOT NULL,
  `millid` smallint(6) NOT NULL,
  `kwatts_s` int(11) NOT NULL,
  `date` date NOT NULL,
  `location` varchar(50) COLLATE utf8_bin DEFAULT NULL,
  `active` tinyint(2) NOT NULL DEFAULT '1',
  `time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `strrecordtype` char(3) COLLATE utf8_bin NOT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_millid` (`millid`)
) ENGINE=InnoDB;

All styles of B-trees have a point of entry known as the root node. We’ve identified that here as page #3. The root page contains information such as index ID, number of INodes, etc. INode pages contain information about the pages themselves, their value ranges, etc. Finally, we have the leaf nodes, which is where we can find our data. In this example, we can see that leaf node #5 has 57 records for a total of 7524 bytes. Below that line is a record, and you can see the row data.

The concept here is that while you organize your data in tables and rows, InnoDB organizes it in branches, pages, and records. It is very important to keep in mind that InnoDB does not work on a single row basis. InnoDB always operates on pages. Once a page is loaded, it will then scan the page for the requested row/record.

Is that clear up to now? Good. Let’s continue.

Page Internals

A page can be empty or fully filled (100%). The row-records will be organized by PK. For example, if your table is using an AUTO_INCREMENT, you will have the sequence ID = 1, 2, 3, 4, etc.

A page also has another important attribute: MERGE_THRESHOLD. The default value of this parameter is 50% of the page, and it plays a very important role in InnoDB merge activity:

While you insert data, the page is filled up sequentially if the incoming record can be accommodated inside the page.

When a page is full, the next record will be inserted into the NEXT page:

Given the nature of B-trees, the structure is browsable not only top-down following the branches, but also horizontally across the leaf nodes. This is because each leaf node page has a pointer to the page that contains the NEXT record value in the sequence.

For example, Page #5 has a reference to the next page, Page #6. Page #6 has references backward to the previous page (Page #5) and a forward to the next page (Page #7).

This mechanism of a linked list allows for fast, in-order scans (i.e., Range Scans). As mentioned before, this is what happens when you are inserting and have a PK based on AUTO_INCREMENT. But what happens if I start to delete values?

Page Merging

When you delete a record, the record is not physically deleted. Instead, it flags the record as deleted and the space it used becomes reclaimable.

When a page has received enough deletes to match the MERGE_THRESHOLD (50% of the page size by default), InnoDB starts to look to the closest pages (NEXT and PREVIOUS) to see if there is any chance to optimize the space utilization by merging the two pages.

In this example, Page #6 is utilizing less than half of its space. Page #5 received many deletes and is also now less than 50% used. From InnoDB’s perspective, they are mergeable:

The merge operation results in Page #5 containing its previous data plus the data from Page #6. Page #6 becomes an empty page, usable for new data.

Page Merging and Page Splitting

The same process also happens when we update a record and the size of the new record brings the page below the threshold.

The rule is: Merges happen on delete and update operations involving close linked pages. If a merge operation is successful, the index_page_merge_successful metric in INFORMATION_SCHEMA.INNODB_METRICS is incremented.

Page Splits

As mentioned above, a page can be filled up to 100%. When this happens, the next page takes new records.

But what if we have the following situation?

Page Merging and Page Splitting

Page #10 doesn’t have enough space to accommodate the new (or updated) record. Following the next page logic, the record should go on Page #11. However:

Page Merging and Page Splitting

Page #11 is also full, and data cannot be inserted out of order. So what can be done?

Remember the linked list we spoke about? At this moment Page #10 has Prev=9 and Next=11.  

What InnoDB will do is (simplifying):

  1. Create a new page
  2. Identify where the original page (Page #10) can be split (at the record level)
  3. Move records
  4. Redefine the page relationships

Page Merging and Page Splitting

A new Page #12 is created:

Page Merging and Page Splitting

Page #11 stays as it is. The thing that changes is the relationship between the pages:

  • Page #10 will have Prev=9 and Next=12
  • Page #12 Prev=10 and Next=11
  • Page #11 Prev=12 and Next=13

The path of the B-tree still sees consistency since it is following a logical organization. However, physically the page is located out of order, and in most cases in a different extent.

As a rule we can say: Page splits happens on Insert or Update, and cause page dislocation (in many cases on different extents).

InnoDB tracks the number of page splits in INFORMATION_SCHEMA.INNODB_METRICS. Look for index_page_splits and index_page_reorg_attempts/successful metrics.

Once the split page is created, the only way to move back is to have the created page drop below the merge threshold. When that happens, InnoDB moves the data from the split page with a merge operation.

The other way is to reorganize the data by OPTIMIZE the table. This can be a very heavy and long process, but often is the only way to recover from a situation where too many pages are located in sparse extents.

Another aspect to keep in mind is that during merge and split operations, InnoDB acquires an x-latch to the index tree. On a busy system, this can easily become a source of concern. This can cause index latch contention. If no merges and splits (aka writes) touch only a single page, this is called an “optimistic” update in InnoDB, and the latch is only taken in S. Merges and splits are called “pessimistic” updates, and take the latch in X.

My Primary Key

A good Primary Key (PK) is not only important for retrieving data, but also correctly distributing the data inside the extents while writing (which is also relevant in the case of split and merge operations).

In the first case, I have a simple auto-increment. In the second my PK is based on an ID (1-200 range) and an auto-increment value. In my third, I have the same ID (1-200 range) but associate with a UUID.

When inserting, InnoDB must add pages. This is read as a SPLIT operation:

Page Merging and Page Splitting

The behavior is quite different depending on the kind of Primary Key I use.

The first two cases will have more “compact” data distribution. This means they will also have better space utilization, while the semi-random nature of the UUID will cause a significant “sparse” page distribution (causing a higher number of pages and related split operations).

In the case of merges, the number of attempts to merge is even more different by PK type.

Page Merging and Page Splitting

On Insert-Update-Delete operations, auto-increment has less page merge attempts and 9.45% less of a success ratio than the other two types. The PK with UUID (on the side other of the spectrum) has a higher number of merge attempts, but at the same time also a significantly higher success ratio at 22.34%, given that the “sparse” distribution left many pages partially empty. 

The PK values with similar numbers also come from a secondary index.

Conclusion

MySQL/InnoDB constantly performs these operations, and you have very limited visibility of them. But they can bite you, and bite hard, especially if using a spindle storage VS SSD (which have different issues, by the way).

The sad story is there is also very little we can do to optimize this on the server side using parameters or some other magic. But the good news is there is A LOT that can be done at design time.

Use a proper Primary Key and design a secondary index, keeping in mind that you shouldn’t abuse of them. Plan proper maintenance windows on the tables that you know will have very high levels of inserts/deletes/updates.

This is an important point to keep in mind. In InnoDB you cannot have fragmented records, but you can have a nightmare at the page-extent level. Ignoring table maintenance will cause more work at the IO level, memory and InnoDB buffer pool.

You must rebuild some tables at regular intervals. Use whatever tricks it requires, including partitioning and external tools (pt-osc). Do not let a table to become gigantic and fully fragmented. 

Wasting disk space? Need to load three pages instead one to retrieve the record set you need? Each search causes significantly more reads?
That’s your fault; there is no excuse for being sloppy!

Happy MySQL to everyone!

Acknowledgments

Laurynas Biveinis: who had the time and patience to explain some internals to me.

Jeremy Cole: for his project InnoDB_ruby (that I use constantly).

via MySQL Performance Blog
InnoDB Page Merging and Page Splitting

Staples Tries Co-Working Spaces To Court Millennials And Entrepreneurs

Are there any Slashdot readers who are doing their work in co-working spaces? An anonymous reader writes:
Staples office-supply stores is aggressively repositioning its brand to entice new customers like tech entrepreneurs and small businesses, reports The New York Times. "A case in point: Staples’ partnership with Workbar, a Boston-based co-working company founded in 2009… Workbar attracts the coveted millennial generation, as well as entrepreneurs, a potential pipeline for new small business customers." Three co-working spaces have now been added to Staples stores, including their original flagship store in Boston, and the Times spotted funky art, skylights, an artificial putting green, as well as gourmet coffee "and — on some nights — happy hours with beer and wine."
"This blend of old and new shows how Staples Inc. is digging up its roots as one of the first, and most successful, big-box retailers. Under Shira Goodman, the company’s new chief executive officer, Staples hopes it can reverse its years of declining sales, unlike so many other retailers left for dead in the internet age." The company also reports online orders already make up 60% of their sales, which they hope to push to 80% by 2020, according to the Motley Fool. "Selling products, 50% of which are outside of traditional office supply categories, to businesses large and small has proven to be a resilient business for Staples."



Share on Google+

Read more of this story at Slashdot.

via Slashdot
Staples Tries Co-Working Spaces To Court Millennials And Entrepreneurs

I Hate My Wide Feet

Illustration by Sam Woolley

My feet are big. Not in a potentially good way, the way that might grab the interest of an NBA scout. Or in the way that might set a woman to wondering. No. My feet are wide.

I wear a size 11, width 4E. I can get away with a 2E, but it’s not ideal. According to this handy chart—for big and tall men, goddamnit—that means my foot is three-quarters of an inch wider than yours, a normal human male’s. My foot is an entire 15 percent wider across.

This is not enough to get me a job in the circus, but it is enough to ensure something that has probably never crossed normies’ minds: I cannot wear most shoes. Think of any hot sneaker, or sharp loafer, or even rain and snow boots. They do not make them in my width. (Nike has relatively recently released some sneakers that come in 4E, but please trust that they’re not the Nikes that you’d ever want to buy.) When I see the kids lining up for new releases, or basketball players shilling their signature models, I know that I am looking at a world of which I can never be a part. Coolness is forever paraded before me, and denied me.

There are a small number of companies that do make nearly all their shoes in extra widths. That list of companies is grim. I wear, and have worn since middle school, exclusively New Balances and Rockports. Who wears those shoes? Dads wear those shoes. I have been a footwear dad since I reached puberty.

The world is not made for me. I have never had dress shoes—which I must buy a half-size bigger just to be able to physically put on—that aren’t perpetual agony. I went bowling this week and I am a chafed, blistered mess. I couldn’t even have a proper punk phase because I couldn’t fit into combat boots.

I am sure there are solutions to my problems. I am sure there is an entire community out there of wide-footed men, who share their questions and provide answers and give each other the support denied them by an industry that’d pretend we don’t exist. I can’t join them, because that would make this my identity. And I do not want to be a Wide-Footed Man. I just want to be a man, who has many unique and humanizing qualities, one of which is my wide feet.

And so I suffer, quietly. You see me, and you don’t consider my plight. You cover your children’s eyes to shield them from the sight of my New Balance 515s. I’ll never be one of you.

I guess Asics makes extra-wide shoes too? No, I’d rather be dead.

via Gizmodo
I Hate My Wide Feet

WikiLeaks just dropped the CIA’s secret how-to for infecting Windows

Enlarge /

The logo of the CIA’s Engineering Development Group (EDG), the home of the spy agency’s malware and espionage tool developers.

WikiLeaks has published what it says is another batch of secret hacking manuals belonging to the US Central Intelligence Agency, as part of its Vault7 series of leaks. The site is billing Vault7 as the largest publication of intelligence documents ever.

Friday’s installment includes 27 documents related to “Grasshopper,” the code name for a set of software tools used to build customized malware for Windows-based computers. The Grasshopper framework provides building blocks that can be combined in unique ways to suit the requirements of a given surveillance or intelligence operation. The documents are likely to be of interest to potential CIA targets looking for signatures and other signs indicating their Windows systems were hacked. The leak will also prove useful to competing malware developers who want to learn new techniques and best practices.

“Grasshopper is a software tool used to build custom installers for target computers running Microsoft Windows operating system,” one user guide explained. “An operator uses the Grasshopper builder to construct a custom installation executable.” The guide continued:

The operator configures an installation executable to install one or more payloads using a variety of techniques. Each payload installer is built from individually configured components that implement part of the installation procedure.

The operator may designate that installation is contingent on the evaluation of the target environment. Target conditions are described using a custom rule language. The operator may configure the tool to output a log file during execution for later exfiltration.

via Ars Technica
WikiLeaks just dropped the CIA’s secret how-to for infecting Windows

Microsoft Translator turns your words into spoken Japanese

You may want to install Microsoft Translator if you’re going to Japan and your vocabulary is limited to "Konnichiwa," "Ohayou" and "Notice me senpai." The app can now turn your spoken words into Nihongo to help you get around the country. Translator can recognize a bevy of languages, but Japanese is only the 10th language its speech translation feature supports. That’s right — it now reads the resulting Japanese words or phrases out loud to make it possible to hold almost real-time conversations with native speakers. The other nine languages in the list are Arabic, Chinese, English, French, German, Italian, Portuguese, Russian and Spanish.

The technology’s end-to-end speech translation capability works by using two neural-network based AIs. Its Automatic Speech Recognition AI detects your words, then its natural language processing technology gets rid of all the fillers like "um" and "uh." After the machine translation AI is done conjuring up a result, the app’s speech synthesizer reads it out loud on the fly.

Microsoft’s Translator app is available for Android, iOS and Amazon Fire devices, though that’s not the only way you can access the tech’s Japanese speech translation feature. It’s now live on the translation solution’s website, as well as on Skype’s real-time translation tool.

Source: Microsoft

via Engadget
Microsoft Translator turns your words into spoken Japanese

The SERPA Sucks, And That’s Just All There Is To Say About It

Let me share with you a brutal truth that is going to hurt the feelings of a lot of people: the BlackHawk! SERPA holster is one of the worst holster designs currently manufactured.

The Federal Law Enforcement Training Center (FLETC) Field Training Directorate (FTD) launched an investigation of the design after “four incidents.” The resulting research discovered that the user’s trigger finger ended up proximal to the trigger on 25-percent of the draw strokes, and that 13-percent of attempted draw strokes began out of sequence. They concluded (PDF) that the basic design of the holster was likely to greatly increase the likelihood of an “inadvertent discharge,” and concluded that it should not be used in any of their training.

They are far from alone. The National Park Service and U.S. Forest Service have banned SERPAs from use by officers, as have many sheriffs and police departments.

IDPA has banned them from competition.

Gunsite Academy recommends against SERPA use, and if you bring one, they’ll force you to disable the locking mechanism, while I’ve watched them do firsthand. Many other shooting schools, instructors, and ranges also require the locking mechanism to be disabled, including Kyle Defoor.

Larry Vickers bans them outright, as does EAG Tactical (unless you’re military and are forced to use it), John “Shrek” McPhee,  Travis Haley, and the late Todd Green, along with many more ranges and instructors.

The vast majority of these agencies and instructors ban the SERPA primarily banned it because of negligent discharge concerns, but that’s not the only significant issue.

There have also been multiple instances of the SERPA’s locking mechanism locking up when it encounters dirt, grit and mud, as we see here in video featuring Craig “Southnarc” Douglas and Paul Gomez.  They and a student who steps in to help end up destroying the holster, and were still unable to free the gun from the jammed locking mechanism. For the record, this was a Simunitions training gun; they would have chosen another avenue if it had been a real firearm with real bullets in the gun.

The fact that the the holster can be ripped free of its mount is yet another failure of the design, beyond the failures of a draw stroke that tends to contribute to negligent discharges, and the locking mechanism that can fail from encountering moderate levels of debris, leaving users unable to draw the gun. Put simply, the holsters are dangerous junk.

The officer from this department (below) notes that five of the seven SERPAs issued were shredded during routine retention training.

So I have a simple question for you: Why on earth would you bet your life on a poorly-made, poorly designed holster that has been banned by many law enforcement agencies, top tier instructors, shooting schools and ranges, when there are so many better options on the market?

 

via Bearing Arms
The SERPA Sucks, And That’s Just All There Is To Say About It

Employee Burnout Is a Problem with the Company, Not the Person

Employee burnout is a common phenomenon, but it is one that companies tend to treat as a talent management or personal issue rather than a broader organizational challenge.

That’s a mistake

, reads an article on HBR. From the article:

The psychological and physical problems of burned-out employees, which cost an estimated $125 billion to $190 billion a year in healthcare spending in the U.S., are just the most obvious impacts. The true cost to business can be far greater, thanks to low productivity across organizations, high turnover, and the loss of the most capable talent. […] When employees aren’t as productive as they could be, it’s usually the organization, not its employees, that is to blame. The same is true for employee burnout. When we looked inside companies with high burnout rates, we saw three common culprits: excessive collaboration, weak time management disciplines, and a tendency to overload the most capable with too much work. These forces not only rob employees of time to concentrate on completing complex tasks or for idea generation, they also crunch the downtime that is necessary for restoration.

via Slashdot
Employee Burnout Is a Problem with the Company, Not the Person

This Stunning Drone Footage of South Africa Looks Like a Real Life Lion King

For the past couple of years, mediocre drone videos of dramatic landscapes have littered the internet. Like, we get it, drone pilots. Your camera flies and stuff looks pretty from the sky and the whole conceit is pretty trite at this point. And then I saw these four minutes of magic, filmed in South Africa.

The footage of the African savanna and all the beautiful creatures that live there should be in the new live-action Lion King movie. Disney movies are supposed to make you feel things, and despite a decade slumbering in cynical despair, my cold black heart swelled when I watched this video. Filmed on location by Roth Rind with a DJI Mavic Pro, the tour of South Africa takes you from precarious cliff sides to the majestic Kruger National Park, one of the world’s largest game reserves.

So even if you’ve grown wearing of pretty drone videos, watch this one. You might feel something, too.

via Gizmodo
This Stunning Drone Footage of South Africa Looks Like a Real Life Lion King