text:
Simply the Best Place to go for Online Fly Fishing and Fly Tying
Apr 11. 2016
(1 replies)
Jul 12. 2015
(0 replies)
Jan 28. 2015
(0 replies)
Jan 10. 2015
(2 replies)
Apr 17. 2016
Tim, What a good looking style! I love...
Jan 6. 2016
Dear Wiggy & all who just don'...
Nov 23. 2015
Miro Jagger's picture inspired me for a...
Apr 3. 2015
BWO May Fly. Hook TMC 2487BL #14....
Home » No metropoilis
Published Aug 25. 2015 - 1 year ago
No metropoilis
Punta Allen on the Yucatan peninsula is not a big town. Lazy and calm is the tempo. Two shops and a few bars and restaurants are the entertainment facilities. And lights are out every night after midnight, when the town generator is stopped!
© Copyrighted material
The Global FlyFisher/Martin Joergensen
The Global FlyFisher/Martin Joergensen
Martin Joergensen
ContactContact us
Contribute articles
No guest posts
The Global FlyFisher Newsletter
About the Global FlyFisher
Discussion forum
PoliciesCopyright © 1994-2016
Copyright © The Global FlyFisher
Copyright © contributing authors
No reprint without permission
- paper, electronic or otherwise
Copyright policy
Review policy
More policies


text:
We may line up early and buy things we don't have any need for but it's not without complaints. Twitter has become the new message board for the world and you can find everything sneakerheads and Apple freaks disdain with a simple search for "Apple needs to" or "Jordan Brand needs to," but careful, the results may become comically addictive.
15 Ways Sneakerheads Are Like Apple Freaks
Watch Now

subset: commoncrawl


text:
- Report: #343700
Report - Rebuttal - Arbitrate
Complaint Review: Wiyi Tea - Living Lean
Wiyi Tea - Living Leanwww.selfhelpworks.com Las Vegas, Nevada U.S.A.
Wiyi Tea - Living Lean Wiyi tea is a ripoff, Living lean is worse Las Vegas Nevada
Ripoff Report
About you?
Ripoff Report
A business' first
line of defense
on the Internet.
If your business is
willing to make a
commitment to
customer satisfaction
Click here now..
Does your business have a bad reputation?
Fix it the right way.
Corporate Advocacy Program™
Canton, Pennsylvania
This report was posted on Ripoff Report on 06/24/2008 01:06 PM and is a permanent record located here: http://www.ripoffreport.com/r/Wiyi-Tea-Living-Lean/Las-Vegas-Nevada/Wiyi-Tea-Living-Lean-Wiyi-tea-is-a-ripoff-Living-lean-is-worse-Las-Vegas-Nevada-343700. The posting time indicated is Arizona local time. Arizona does not observe daylight savings so the post time may be Mountain or Pacific depending on the time of year.
Ripoff Report has an exclusive license to this report. It may not be copied without the written permission of Ripoff Report.
Click Here to read other Ripoff Reports on Wiyi Tea - Living Lean
If you would like to see more Rip-off Reports on this company/individual, search here:Search Tips
In order to assure the best results in your search:
- Keep the name short & simple, and try different variations of the name.
- Do not include ".com", "S", "Inc.", "Corp", or "LLC" at the end of the Company name.
- Use only the first/main part of a name to get best results.
- Only search one name at a time if Company has many AKA's.
Advertisers above have met our
strict standards for business conduct.


text:
A Valediction Forbidding Mourning
by John Donne
Analysis: Allusions
When poets refer to other great works, people, and events, it's usually not accidental. Put on your super-sleuth hat and figure out why.
Science References
- Donne gives a nod to a few scientific ideas. He talks about earthquakes, a natural phenomenon that was exotic and little understood by Englishmen of the seventeenth century. (9-10)
- He contrasts this with his reference to the "trepidation of the spheres," an idea that can be traced all the way back to the Greeks and based on the idea of vibrations of stars and planets creating "music" that controlled our fates. By then, scientists were on the verge of moving past these ideas as well as the whole "earth is the center of the universe" thing, but the image still was popular among artists. Shakespeare used these images a ton. (11-12)
- In talking about gold and metalworking in general, Donne gives at least a vague allusion to alchemy, the ancient scientific endeavor to transform other metals into gold. (In fact, Donne wrote a poem titled "Love's Alchemy.") (21-24)


text:
Keep our Dollars in the U.S.A. Use American Wholesale Distributors.
Update Wholesale Audio Club USA Network for dealers only. Wholesale audio club u.s.a. provides wholesale services to licensed resellers and dealers only. Mobile electronics dropship wholesalers and wholesale distributors stock thousands of electronics products such as radios cd players speakers subwoofers coaxials 6x9s wires cables antennas dvd players lcd video screens 12 volt products like rca cables interfaces adapters interconnects in dash cassette players mp3 ipod, bluetooth products, wholesale suppliers dropship services, spreadsheets pricelists product images audio stereo radio video 12 volt installation accessories car audio wholesale to dealers. Wholesale to trade only. Wholesale dropship warehouses located all across the United States. Alpine kenwood Sony Clarion JVC Pioneer Mobile Video Mobile DVD, 20 inch LCD screens. Crossovers capacitors power distribution blocks gold wires professional wires and cables phoenix gold monster cable MTX woofers 1000 watt subs. A/D/S Aapex Electronics Inc. Aborus Technologies Access - A - Fuse Access Technologies Accutech International Ace Antenna Co. Acoustic Solutions Adcom Car Audio Advance Automotive Tech. Advancetec Industries ADX OEM AEW Ai Research Aiwa America Inc. Alcohol Countermeasure Alcohol Sensors. Bluewave Audio distributor: 2016 wholesale car audio product offering is Harrison Labs Boss Audio PowerLine BlastingCaps Sony, Cobra cb radios Wholesale car audio Pyle Car Audio MA Audio Mobile Authority Samsung Panasonic JBL Home Audio Sanyo Jensen Maxell Monster-Cable Phoenix Gold American International Teac Home Audio AudioSource Proton Sherwood AMC, Pinnacle, Crime Stopper, Advent, Hitachi, Magnavox, JVC, Motorola, Sharp, TDK, Yamaha, & Uniden. All products from PowerLine Audio - Wholesale Electronics carry full warranty. All brand new factory fresh If you are looking for Alpine Kenwood Kicker JL Audio MB Quart Pioneer wholesalers Clarion PPI Rockford Fosgate start your own business Lightning Audio ADS Aiwa Alumapro Ample Audio Audiobahn Autotek Audio Control Cerwin Vega dropship wholesalers electronics Earthquake Image Dynamics Kove Audio Mcintosh MTX OZ Audio Sub Zero or Zapco Click Here. Wholesale car audio. Stereos Amps PA System drop shippers B2B Drop Shipping only.New Dealers Welcome.This is real wholesale. Fax your tax ID to our office (325) 202-9228 Locate the master wholesale distributors for car audio all across the U.S.A. Welcome to Wholesale Audio Club.
Dealers connect with "key" wholesale car audio and electronics drop shippers for car & home stereo, audio-video and consumer electronics here in the U.S.A. Wholesale fulfillment services, master distributors, business to business, wholesale to trade only. Alpine rockford fosgate sony clarion pioneer kicker mb quart mtx and so much more all sold to dealers with a tax id only. wholesale car audio distributors speakers receivers amps subwoofers wire and cable, interfaces, adapters, bluetooth, iPOD, adapters, car stereos, mobile video, consumer electronics distributors club wholesale audio club serves resellers and dealers / exporters / container shipments / large scale wholesale electronics sources. Start a car audio / consumer electronics business easily and effectively with wholesale audio club USA. Take a look at our wholesale car audio electronics membership packages here.
wholesale to stores & e-tailers mobile electronics, dropship
distributor, car audio, home audio-video, consumer electronics, dropship,
Wholesale audio club, u.s.a., master wholesale drop shippers and
distributors, car & home audio,- stereo market, wholesale companies,
wholesale distributors dropship suppliers, Wholesale car audio drop
shippers, suppliers, selling audio, better brands, faster shipping,
customer service, lower wholesale prices, product images, uploadable
spreadsheets, Alpine, Kenwood, Sony, Lanzar, kenwood,
pioneer, Kicker, MTX, Rockford, Fosgate, Clarion, JBL, JVC, Pioneer,
Blaupunkt, jl audio, infinity, Panasonic. Drop ship wholesalers, Wholesale
car audio, stereo, radio, mp3, dvd, cd, video, Electronics, wholesale,
distribution, drop shipping, drop shipping services, licensed
re-sellers, 2016 music gear, musical equipment, distribution, drop shipping service, speakers, amplifiers, wire, cable, electronics
accessories, wholesale to dropship trade, wholesalers to dealers, tax id
required, B2B Drop Shipping, audio distributor, music instrument dropship distributor,
touch screen, navigation, bluetooth, iPOD accessories, home audio, home lcd
screens, home theater, wholesale drop shippers 2016 Dealers, Re-sellers,
Exporters, Finally locate and connect with the hard to find "back end"
Car & Home Audio-Video Distributors that are located in the United
States. You must have a tax id to use our wholesale services. Wholesale
audio club's confidential web portal is loaded with real wholesale car
audio, home audio, electronics, pro audio, dj equipment distributors
that only sell to businesses.
Life Links: The United Way Community Outreach The Glory Site
Wholesale Car Audio Distributors | Sony | AudioPipe | Kenwood | Pioneer Wholesale | Ipod Accessories | Legacy Equipment | Gem Sound Home Audio | Ameri Pro Audio | Blaupunkt | Cobra | Coby drop shippers | Rockford Fosgate | Pyle Pro Audio
Dealers Login Homepage | About Us | Contact Us | Dropship FAQ
More Information On Our Service | Wholesale Membership Packages
Privacy Policy Earnings Disclaimer Secure Application
Wholesale Car Stereo-Audio Distributor USA
In Business Since 2000. Excellent Reputation
Copyright 2000-2016 Wholesale Audio Club USA� All rights Reserved.


text:
Venice, FLUSA
Hometown: Washington, DC
January 4, 2013
3 - 5 hours, or more, with a break.
What do you think, Joyce? 8-)
No dog. Do not anticipate walking with group due to distance from "home" in Natick.
Read and agreed.
No answer yet
I met Joyce in FL and I have enjoyed paddling with her. I would rank myself an "advanced beginner" with several years of experience, but still limited skills.
Meetup members, Log in
By clicking "Sign up" or "Sign up using Facebook", you confirm that you accept our Terms of Service & Privacy Policy


text:
A judge rejected a motion Friday to dismiss murder charges against Edgar Ray Killen.
Killen, a former lumber mill operator from Union, took the stand briefly to testify about his financial status.
He's accused of orchestrating the murders of James Chaney, Michael Schwerner and Andrew Goodman in rural Neshoba County.
A 1967 federal trial revealed that the killings were part of a Ku Klux Klan conspiracy.
Circuit Judge Marcus Gordon granted a prosecution motion to sequester the jury during Killen's trial, now scheduled to begin Apr. 18. He reserved rulings on some other motions, including one dealing with transcript testimony.
Defense attorney Mitch Moran had wanted Gordon to dismiss the case, largely on speedy trial issues. Gordon, however, said he saw no evidence of an intentional delay.
Prosecutors are asking that former testimony from Killen's 1967 conspiracy trial be admissible and that the defendant notify the state prior to the trial of any objections to the transcript.


text:
Tag Archives: doug baldwin
Doug Baldwin Talks Trash About Seahawks Defense After Fight with Richard Sherman
Doug Baldwin and Richard Sherman have been teammates since the two played together at Stanford. But that doesn't mean the Seattle Seahawks stars always get along. Because they definitely don't. On Monday, Baldwin and Sherman got into a fight at practice. Then, after it was finished, Baldwin found a reporter and talked some more trash […]
Doug Baldwin Makes Insane One-Handed Grab in Freezing Cold (Video)
It's hard to do anything in sub-zero temperatures, so when Doug Baldwin went up and snagged a ball well over his head with one hand, we were pretty darn impressed. If you haven't seen it yet, I'm sure you'll be just as impressed after checking it out below:
Doug Baldwin Leaps for the End Zone, Gets Blasted Off the Field (Video)
Doug Baldwin didn't suffer the worst fate possible when he tucked the ball and jumped towards the end zone against the 49ers on Sunday. The worst thing that could have happened was that he lost the ball. Or that he somehow was killed doing that move. Instead, he just got knocked WAY sideways. It wasn't a […]
Doug Baldwin Says Poop Celebration at SB XLIX Was Directed at Darrelle Revis (Audio)
Remember Doug Baldwin's poop celebration during Super Bowl XLIX? The one that earned his team a 15-yard penalty after the wide receiver scored a touchdown to put the Seahawks ahead by a score of 24-14? Of course you do! Well you may be interested to know that the celebration was actually directed towards Patriots cornerback Darrelle […]
Doug Baldwin's 'Pants-Drop' Celebration Offended NBC (Video)
Doug Baldwin Rant Blasts Seahawks "Haters" and "Doubters"—So, Pretty Much Everybody (Video)
So Seattle Seahawks wide receiver Doug Baldwin was feeling pretty feisty after Sunday's thrilling comeback victory against the Packers. First he got all snarky about Deion Sanders during his post-game interview down on the field. Then he sought out more reporters to b*tch out all the other "haters" and "doubters" who didn't believe in the Seahawks […]
Richard Sherman and a Cardboard Doug Baldwin Mock the NFL Media Rules (Video)
If you thought that Richard Sherman would keep his mouth shut on the NFL's actions against Marshawn Lynch, you were right…for about three days. At a fairly surreal press conference, Sherman took to the podium with a cardboard cutout of Doug Baldwin (and Baldwin's voice) to take a few shots at the NFL's media policy. He […]
Stat Line Of The Night — 12/12/11 — Doug Baldwin
Nobody wanted to take a chance on Doug Baldwin at the 2011 NFL Draft, but after watching him put forth a tremendous performance against the St. Louis Rams last night there are probably 31 teams in the league who are regretting their decision. Baldwin's first appearance saw him take the opening kickoff 37 yards on […]


text:
Improve Cash Flow
Deposits are made the
next day.
Process payments with NO contracts, NO early termination fees, NO terminal printers, and no more paper receipts to print and save for months.
Pyaperless Payment Credit Card Servicespe your pahere.
"What's the use of a fine house if you haven't got a tolerable planet to put it on"
Henry David Thoreau
Save Time
See all sales in real time
no more batch reports at
the end of the day.
Save Trees
Over four million trees
are cut down for paper receipts each year.
Copyright Paperless Payment Credit Card Services. All rights reserved.


text:
Hello everyone. This is my first attempt at using wordpress for our photography site. I installed wordpress to the server, (my provider is godaddy).
Everything says the WP was installed successfully, but the wp-admin page just goes to the normal parking page for the site.
Am I a complete moron and missing something, or should this url be opening so I can set up my site?
Thanks, and sorry if this is a simple user error.
Feeling a bit intimidated.


text:
Over the weekend, we got to hear Wiz Khalifa and Soulja Boy remix Drake's new single 'Started From The Bottom'. Now Fat Trel decides to kick off the week by spitting some bars over the Mike Zombie instrumental. Look out for the Louie V Mob mixtape dropping February 12th follow by "SDMG" on March 13th.
Listen and download the track below.
Download: Fat Trel – Started From The Bottom Freestyle
Previously: Fat Trel Ft P-Wild – Projects
Pingback: Fat Trel – Started From The Bottom Freestyle | YouHeardThatNew()
Pingback: getmybuzzup Hot Lotto "Juiced" Ft. Fat Trel (Video) - getmybuzzup()


text:
You Pay: $6.99
Questions? Ask our experts:
800.606.6969 Live Chat
This Giottos retractable rubber/metal spiked foot is for the MT and BG (a.k.a. GB) series tripods. Spikes are designed for use in wet soil, gravel, or rocky areas.
|Packaging Info
|Package Weight
|0.18 lb
|Box Dimensions (LxWxH)
|3.0 x 2.5 x 2.0"


text:
|Leisure and Cultural Services Department 2012© | GovHK | Site Map | Important Note | Privacy Policy | Contact UsLast revision date 27 July, 2016
|Free Admission to LCSD Museums
Appreciate culture and art
|Animal Party Go Go Go!
Come and join our "Animal Party Go Go Go!" ! Our Animal Ambassadors are going to spread the laughter with loads of whimsical animal mysterious experiences!
|Curator's Kitchen
We had a great time exploring North Point community and culture while enjoying a delicious bowl of Fujian-style dumpling prepared by Dr Lesley Lau, Head of Art Promotion Office!
|Commentary x Humour = Cartoons before and after the 1911 Revolution
These knife and sword have nothing to do with Chinese Kung Fu but they are for braid cut instead!
|Want to see the beautiful paintings by Claude Monet?
This isn't all! From 4th May, 17 masterpieces will be waiting for you at the Hong Kong Heritage Museum! Come and see more!
|How come it's all blurry?
Hey! How come it's all blurry? French impressionist Claude Monet's career wasn't always smooth sailing, but his passion for painting never stopped him from creating a world of colour! Want to see more? We'll meet you at Hong Kong Heritage Museum!
|The later it gets the duller your mind becomes.
The later it gets the duller your mind becomes. Like many famous artists, Monet has a habit of waking up early to work. Breathing in the fresh air after a good night's sleep will keep you energized! Do you want to know more about Monet? Come to the exhibition to learn more!
|Do you remember the Japanese arch bridge in Monet's work?
Do you remember the Japanese arch bridge in Monet's work? He had always been fascinated by the Japanese culture! If you want to know more about Monet's work, drop by the exhibition now!
|Did you notice that Monet favors a certain motif in his work?
Did you notice that Monet favors a certain motif in his work? It even led him to paint over 100 paintings on it! Make a guess!
|Do you want to travel to France after visiting the Monet exhibition?
Do you want to travel to France after visiting the Monet exhibition? Learn these everyday phrases to help you on your journey!
|"Freeman Lau & Design: Inter-dependent Decisions" Exhibition Interview Videos
The interview videos not only include Lau's introduction to the exhibition, but also a number of his teachers, fellow designers, artists, friends and work partners who will talk about Lau and his design concepts.
|Jockey Club "Museum of Art on Wheels" Outreach Learning Programme
Invite you into an interactive "art laboratory" where you can see how ancient and contemporary artists "transform" subjects of daily life into works of art!
|Transcend.Hong Kong Museums.Happy Faces
|Transcend.Old and New.Conservation
|Transcend.History.From Generation to Generation
|"Bring Me Home - the Story of Hong Kong Culture, Art & Design" souvenir series
Now you can bring special designed museum souvenirs back home to cherish and to savour.
|Bruce Lee:Kung Fu‧Art‧Life
More than 600 invaluable items of Bruce Lee memorabilia will be showcased to create an exhibition that looks at Bruce Lee from a more comprehensive, in-depth and independent perspective.
|Leisure and Cultural Services Department 2012© | GovHK | Site Map | Important Note | Privacy Policy | Contact UsLast revision date 27 July, 2016


text:
- Pew pew pew You know what I mean: lasers! Well, not only lasers, plenty of other laser-like guns too. With all that progress they have made you certainly would expect soundless guns to exist. Considering that we have such today! Bonus is that many of those large laser-type guns in turrets on space ships also have a quite powerful recoil.
- We live in a middle of nowhere If you watched sci-fi a lot, you should have seen many cases when spaceship suddenly loses it's ability to fly faster than light. What happens next? Well, they just fly to a nearby planet, which is hours or at worst days away. At the same time our own planet is over 4 light-years away from the nearest other star. This means if some ship breaks down in the middle, it's over 2 years away from any help (if it can fly close to light speed that is). So that's why no aliens have visited us yet - we live in the middle of nowhere!
- Ships fly like planes There is a reason why planes fly the way they do: aerodynamics. They are restricted by our atmosphere. Spaceships however fly in vacuum. There is no reason for them not to be able to turn in place. And with all that fancy technology they have it should be possible for them to make 90 degree turn at high speed. Yet they still prefer to fly in an aerodynamic way. Why?
- Wars are fought with weakest weapons there are Many TV show have very powerful weapons available. A single shot can completely disintegrate multiple humans, a single missile can make entire planet uninhabitable and so on. Yet, when things come to interplanetary war, everyone place it nice and safe: weapons just make non-lethal injuries and planetary bombardments make no more damage than World War II bombs. Everyone is so civilized, no intentions of annihilating your foes even when you lose.
- Computers are still stuck somewhere in 70s This one is where sci-fi creators struggle the most to see the future. Besides human-like AI and ability to talk in human voice computers are more often behind the reality. Just think of it: counting smartphones as computers many of us actually have more than one, while spaceships of hundred years later still have a single computer in them. And often a quite a slow one too.
- Ships come to halt on engine failure What happens when ships engine fails? Usually it comes to full stop. And I'm not talking about faster-than-light travel, sublight speed spaceships also often stop on engine failure. At the same time our primitive space ships fly in close proximity of our solar system with their engines off most of the time. In vacuum there is no resistance you know, so you do not lose speed, hence engines are only for reaching it and maneuvering and fighting gravity.
- Aliens have no diversity and are sooo predictable Even in my city of a bit over half million of people I can't predict how someone will react to certain actions. And we look quite different. Dress different. Have different religions. We even have different native languages, though one dominates. While aliens we encounter in sci-fi are all the same, speak one language, have one culture and are very very predictable. How many times have you heard "these guys will act aggressively", "they never withdraw, that's their weakness", etc. Come on!
- We're the only species with creativity in extraordinary situations When something very unusual happens, our friends aliens, despite being significantly more advanced then us, seem to be unable to find any clever solution. They just do the usual, casual, what they are used to and only we, humans, are able to think of something smart, non-traditional to save everyone. How did those aliens manage to develop so much in the first place?
aurisc4 blog
2015 m. gruodžio 27 d., sekmadienis
Sci-Fi nonsenses
One of the most irritating things when watching Sci-Fi is various mistakes related to real technologies. Here's my list of them.
Pranešimą parašė Aurimas Černius ties 11:18 Komentarų nėra:
žymės: scifi
2015 m. gegužės 28 d., ketvirtadienis
C++ inheritance explain (part III)
This is the third part in the series. If you haven't, have a look at part I and part II. This part is limited to a single, but rather complicated inheritance feature in C++.
Let's analyze the code part step by step:
The code where we use Derived2 is pretty much the same:
Virtual inheritanceNow we've come to one of most complicated features - virtual inheritance. Let's start as usual, with most trivial example:
class Base { public: int m_base_member; void set_base_member(int x) { m_base_member = x; } }; class Derived : public virtual Base { public: int m_derived_member; void set_derived_member(int x) { m_derived_member = x; } };This time I've added implementations to methods, as they do matter now. Base class translates to this (nothing particular here):
struct Base { int m_base_member; }; void Base_set_base_member(Base *_this, int x) { _this->m_base_member = x; }Now let's see the layout for Derived:
struct Derived_SubObject { int m_derived_member; }; struct Derived : public virtual Base { void *_vtable; Base _parent; Derived_SubObject _derived_part; };One thing is, that Derived class does have a VTable. That could have been guessed. As you can see, I've split Derived class specific members into a separate struct, that I placed directly inside Derived, rather than inlining members. This was done in order to explain the code in set_derived_member() method, which looks like this:
void Derived_set_derived_member(Derived *_this, int x) { Derived_SubObject *_derived_part = _get_sub_object(_this, Derived_part); _derived_part->m_derived_member = x; }The important part here is that implementation of set_derived_member() make no assumptions about layout of Derived being passed in, with exception for VTable, which is expected to be at the start. The sub-part of Derived can be located anywhere in the object, method always looks it up via VTable. This has two implications:
- negative performance impact, as instead of accessing variable via offset in object, a VTable lookup is performed
- in case of multiple inheritance, duplication can be avoided for diamond-problem (as shown below)
class Base { public: int m_base_int; }; class Derived1 : public virtual Base { public: int m_derived1_int; void foo(int x) { m_base_int = x; } }; class Derived2 : public virtual Base { public: bool m_derived2_bool; void bar(int y) { m_base_int = y; } }; class DerivedMultiple : public Derived1, public Derived2 { public: bool m_multiple_bool; }; /* DerivedMultiple object; */ Derived1 *d1 = &object; d1->m_base_int = 3; d1->foo(6); Derived2 *d2 = &object; d2->m_base_int = 4; d2->bar(2); Base *b = &d2; b->m_base_int = 0;The resulting structs and functions are:
struct Base { int m_base_int; }; struct Derived1_SubObject { int m_derived1_int; }; struct Derived1 { void *_vtable; Base _parent; Derived1_SubObject _derived1_part; }; void Derived1_foo(Derived1 *_this, int x) { Base *base = _get_sub_object(_this, Base_part); base->m_base_int = x; } struct Derived2_SubObject { bool m_derived2_bool; }; struct Derived2 { void *_vtable; Base _parent; Derived2_SubObject _derived2_part; }; void Derived2_bar(int y) { Base *base = _get_sub_object(_this, Base_part); base->m_base_int = y; } struct DerivedMultiple_Subobject { bool m_multiple_bool; }; struct DerivedMultiple { void *_vtable; Base _parent; Derived1_SubObject _derived1_part; Derived2_SubObject _derived2_part; DerivedMultiple_Subobject _derivedmultiple_part; };As you see, in the final layout of DerivedMultiple there is only one Base part. The methods Derived1::foo() and Derived2::bar() have identical code, all they require is a VTable at the start of _this. Because DerivedMultiple satisfies this requirement, it can be passed in directly to either of two.
Let's analyze the code part step by step:
/* DerivedMultiple object; */ Derived1 *d1 = &object; _get_sub_object(d1, Base_part)->m_base_int = 3; // d1->m_base_int = 3; Derived1_foo(d1, 6); // d1->foo(6);When doing pointer assignment compiler is not required to do anything about pointer, as all that is needed is a VTable at the start. When accessing anything from Base a VTable-lookup is done to obtain a pointer to Base part inside object. foo() call is trivial.
The code where we use Derived2 is pretty much the same:
Derived2 *d2 = &object; _get_sub_object(d2, Base_part)->m_base_int = 4; //d2->m_base_int = 4; Derived2_bar(d2, 2); //d2->bar(2);Last, let's cast to Base and use that:
Base *b = _get_sub_object(d2, Base_part); b->m_base_int = 0;The base is obtained the same way as inside implementations of foo() and bar(). The important thing to note here is that making Base into a virtual class does not change that, except that pointer to VTable could be reused then. This draws few conclusions:
- Virtual inheritance has negative performance impact, because of regular sub-object lookups
- In case of multiple inheritance and diamond hierarchy, two copies of common base class can be avoided
- Internal layout of class is unpredictable, compiler can rearrange sub-objects
- Virtual inheritance may not solve problem with duplicate base class; this can happen, if there is a complex mix of classes, where some classes do not use virtual inheritance, so their layout has to be preserved
Pranešimą parašė Aurimas Černius ties 12:28 Komentarų nėra:
2015 m. balandžio 3 d., penktadienis
C++ inheritance explained (Part II)
This is the second part, explaining how inheritance works in C++ under the hood.
If you haven't read the first part, I recommend to have at least a quick look, as it clarifies the approach I'm taking. You can find first part here.
In this part I'll explain probably the most feared feature in C++ - multiple inheritance.
That immediately raises two questions:
But now we have another question: what if we call foo() from inside bar()? How is CommonBase resolved when we have pointer pointing somewhere inside DerivedMultiple object? Let's demystify it with this example:
Yes, that right - the two calls will access the different CommonBase subobject inside DerivedMultiple! Let illustrate it with numbers:
Now you know, that multiple inheritance is hated for a reason!
Let's take this example:
What you see here happening is:
If you haven't read the first part, I recommend to have at least a quick look, as it clarifies the approach I'm taking. You can find first part here.
In this part I'll explain probably the most feared feature in C++ - multiple inheritance.
Multiple inheritance with simple base classesLet's go for simple, but yet famous diamond problem:
This one is tricky. Let's list only resulting structs here first:
class CommonBase
int m_some_int;
void set_int(int x) { m_some_int = x; }
class DerivedOne : public CommonBase
float m_some_float;
void foo(){}
class DerivedTwo : public CommonBase
bool m_some_bool;
void bar() {}
class DerivedMultiple : public DerivedOne, public DerivedTwo
void baz(){}
void set_int(int x) { DerivedOne::set_int(x); }
Pay attention to DerivedMultiple struct. To make it clear, let's expand it's parents inline:
struct CommonBase
int m_some_int;
struct DerivedOne
CommonBase _parent;
float m_some_float;
struct DerivedTwo
CommonBase _parent;
bool m_some_bool;
struct DerivedMultiple
DerivedOne _parent1;
DerivedTwo _parent2;
As you can see, DerivedMultiple has two copies of CommonBase! Another thing to note is that DerivedTwo does not start at offset 0!
struct DerivedMultiple
/* DerivedOne _parent1; */
CommonBase _parent1_parent;
float m_some_float;
/* DerivedTwo _parent2; */
CommonBase _parent2_parent;
bool m_some_bool;
That immediately raises two questions:
- Which CommonBase is used, when needed?
- How do we call DerivedTwo::bar() on a DerivedMultiple object?
results in:
/* DerivedMultiple object; */
As you can see, when we call method, that comes from DerivedTwo, we don't pass in pointer to our object as first argument! Instead, we pass in pointer to the subobject part, where the DerivedTwo part is located!
/* DerivedMultiple object; */
DerivedTwo_bar(&object._parent2); /* <--- PAY ATTENTION */
But now we have another question: what if we call foo() from inside bar()? How is CommonBase resolved when we have pointer pointing somewhere inside DerivedMultiple object? Let's demystify it with this example:
This code translates into the following:
/* DerivedMultiple object; */
DerivedOne *derived1 = &object;
DerivedTwo *derived2 = &object;
OK, so this gives us two puzzles. First, when assigning pointer to DerivedMultiple to a pointer to DerivedTwo, the pointer is automatically shifted to the subobject part! Second, and the most important, THERE IS NOTHING SPECIAL DONE TO RESOLVE CommonBase!
/* DerivedMultiple object; */
DerivedOne *derived1 = &object;
DerivedTwo *derived2 = &object._parent2;
CommonBase_foo(derived2); /* but, THEY LOOK THE SAME? */
Yes, that right - the two calls will access the different CommonBase subobject inside DerivedMultiple! Let illustrate it with numbers:
Calling set_int() on main object and DerivedTwo will set different m_some_int fields.
/* DerivedMultiple object; */
DerivedTwo *two = &object;
int five = object.DerivedOne::m_some_int;
int six = object.DerivedTwo::m_some_int;
Now you know, that multiple inheritance is hated for a reason!
Multiple inheritance involving virtual base classTake this hierarchy:
The resulting structs are:
class SimpleBase
int m_some_int;
class VirtualBase
float m_some_float;
virtual void foo() {}
class Derived : public SimpleBase, public VirtualBase
To make it clear, let's expand parents directly inside:
struct SimpleBase
int m_some_int;
struct VirtualBase
void *_vtable;
float m_some_float;
struct Derived
void *_vtable;
SimpleBase _parent1;
VirtualBase _parent2;
As you see, the only changes are related to VTable. There are few possible scenarios:
struct Derived
void *_vtable;
/* SimpleBase _parent1; */
int m_some_int;
/* VirtualBase _parent2; */
void *_parent2_vtable;
float m_some_float;
- if the first base class is polymorphic, it's VTable can be reused (no need to add such field at the beginning)
- there might be several pointers to VTable inside class (some can be inherited)
- every pointer to VTable can point to the same or different place (this is entirely up to compiler)
Method overrides in multiple inheritanceThings get further complicated when we override methods in a class with more than one base.
Let's take this example:
You already have the idea, how resulting struct look like, so I won't bother pasting them here. Let's execute this code:
class Base
int m_base_int;
class SimpleDerived : public Base
int m_simple_derived_int;
class VirtualDerived : public Base
int m_virtual_derived_int;
virtual void set_int(int x) { m_virtual_derived_int = x; }
class Multiple : public SimpleDerived, public VirtualDerived
virtual void set_int(int x) override { m_simple_derived_int = x; }
When translated to C it looks like this:
/* Multiple object; */
VirtualDerived *vd = &object;
vd->set_int(8); /* <--- HOW DOES THIS ONE WORK? */
Looks like I've been lying to you a bit, when explaining how method overrides work :)
/* Multiple object; */
_get_method_address(object._vtable, set_int)(&object, 5); /* no magic here */
VirtualDerived *vd = &object._parent2; /* this one familliar too */
_get_method_address(vd->_vtable, set_int)(_get_object_address_for_func(vd, set_int), 8);
What you see here happening is:
- method address is obtained from VTable as usual
- because object we have a pointer to can be involved in multiple inheritance, we can not pass pointer to it to a function - what if we have a pointer to some subobject inside, while method expects a pointer to actual object?
- before pointer is passed to function, it goes through some compiler function, that looks to VTable and returns us a valid address to pass to function (not necessairy to beginning of real object)
- function is used all the time when object address is passed to a virtual method, because we never know, what types are derived from given class, the tree can have a very complicated mixture of single and multiple inheritance
Hints for safe use of multiple-inheritance
- try to use only single inheritance and interfaces; in C++ interface would be a class, that has nothing but statics and pure-virtual methods
- the biggest problems come from classes with fields and non-virtual methods; try to achieve, that non-first base class has none
- make non-primary base classes as trivial as possible (ideally interfaces), best top level classes (not derived from anything)
- avoid diamond, use virtual inheritance once noticed
- be very very careful
Pranešimą parašė Aurimas Černius ties 06:35 Komentarų nėra:
2015 m. kovo 26 d., ketvirtadienis
C++ inheritance explained (Part I)
Inheritance in C++ is one of most complex forms of inheritance there is. Understanding, how it works and what hidden features are involved is useful (if not required) to not mess things up.
I'll try to explain it all in detail by examples.
Before we start, there are few things to note:
Another thing that changes significantly is how methods are called. Let's take C++ code:
This involves the following things behind scenes:
I'll try to explain it all in detail by examples.
Before we start, there are few things to note:
- Visibility (both member and inheritance) has no effect, so everything in all examples is public
- The C++ code will translated to C code to reveal, what is done automatically by compiler
- The "C++ compiler" is an imaginary one, in attempt to make things simple and clear
- Namespaces and name mangling are ignored for simplicity (have no impact on inheritance)
The simple inheritanceLet's start with the most trivial example:
When compiled, compiler turns it into something like this:
class SimpleBase
int m_some_int;
void foo(int x) {}
class SimpleDerived : public SimpleBase
float m_some_float;
void bar() {}
How it works:
struct SimpleBase
int m_some_int;
void SimpleBase_foo(SimpleBase *_this, int x) {}
struct SimpleDerived
SimpleBase _parent;
float m_some_float;
void SimpleDerive_bar(SimpleDerived *_this) {}
- top level class becomes a struct with member variables matching those of the class
- methods become functions, that take a pointer (in C++ it's actually a reference) to a corresponding struct as first argument, with other arguments being that of the original method
- inheritance places parent struct as first member, it has an offset 0, so derived class can be casted to a base one (this is done automatically by compiler)
- special methods (like constructor) and overloaded operators are also methods and are turned into similar functions
- static methods are just functions, in this case class serves simply as a namespace plus has some visibility related features
Simple inheritance with polymorphic base classLet's change the example so that base class is polymorphic:
In this case compiler turns base class it into something like this:
class PolyBase
virtual void foo() {}
void bar() {}
int m_some_int;
class SimpleDerivedFromPoly : public PolyBase
virtual void foo() override {}
void bar() {}
float m_some_float;
What we see different from simple inheritance is that there is something called _vtable as first member (compiler is free to place it anywhere, but it is usual to place it as first member).
struct PolyBase
void *_vtable;
int m_some_int;
void PolyBase_foo(PolyBase *_this) {}
void PolyBase_bar(PolyBase *_this) {}
Another thing that changes significantly is how methods are called. Let's take C++ code:
Compiler translates it to something like this:
/* PolyBase object; */
The difference you see here is:
/* PolyBase object; */
_get_method_address(object._vtable, foo)(&object);
- non-virtual method is a simple function call
- virtual method call involves so called vtable-lookup: address of method foo is found in vtable (somehow, this is up to compiler), the address is a pointer to function that is called.
Nothing particular here. Let's see how method calls look like:
struct SimpleDerivedFromPoly
PolyBase _parent;
float m_some_float;
void SimpleDerivedFromPoly_foo(SimpleDerivedFromPoly *_this) {}
void SimpleDerivedFromPoly_bar(SimpleDerivedFromPoly *_this) {}
/* SimpleDerivedFromPoly object */
/* SimpleDerivedFromPoly object */
_get_method_address(object._parent._vtable, foo)(&object);
- non-virtual method calls the method from child class
- virtual method call is no different at all (except that _vtable is inside _parent)
- the actual value of _vtable is different for an object of every class, that's how the correct method is found
Simple inheritance with polymorphism added in derived classUnlike in previous example, this time let's have simple base class and polymorphic derived:
This results in the following structs:
class SimpleBase
int m_some_int;
void foo() {}
class PolymorphicDerived : public SimpleBase
bool m_some_bool;
virtual void bar() {}
As you see, now things get a bit more complicated, because a pointer to VTable is prepended before parent (it could place it after it too, but I'm placing it this way, because it will make it easier to understand multiple inheritance later)! Let's see how it works!
struct SimpleBase
int m_some_int;
struct PolymorphicDerived
void *_vtable;
SimpleBase _parent;
bool m_some_bool;
When traslated to C, it results in the following. I'll split it to explain individual parts.
/* PolymorphicDerived object; */
SimpleBase *base = &object;
So, as you see, when assigning to base the pointer is automatically shifted by compiler to point to parent! The pointer to base class actually points not to object, but inside it. This enables the simple method call as it would be if had an object of SimpleBase.
Calling inherited method from the real object is also different:
/* PolymorphicDerived object; */
SimpleBase *base = &object._parent;
in this call not the object is passed as parameter, but the subobject of relevant type.
Last thing to note is downcasting:
Results in something like this:
/* SimpleBase *base; */
PolymorphicDerived *derived = static_cast<PolymorphicDerived*>(base);
The exact opposite must happen, the pointer must be moved back by pointer size, in order to point at the beginning!
/* SimpleBase *base; */
PolymorphicDerived *derived = (PolymorphicDerived*) ((void*)base) - sizeof(void*);
This involves the following things behind scenes:
- Casting PolymorphicDerived* to void* and then to SimpleBase* will result in invalid pointer (not pointing to subobject part)!
- Comparing PolymorphicDerived* to SimpleBase* using == or != operator will move one of them (either) by pointer size before comparison
Pranešimą parašė Aurimas Černius ties 10:54 Komentarų nėra:
2015 m. sausio 13 d., antradienis
Basic rules of automated software testing
There are a lot of posts about what should or shouldn't be done when writing automated tests for software. Below is my list.
As such, claims "I don't need tests" are pretty much void if there is more than one developer on the project.
Tests are just like any other code, they have to be verified. The simple way to do this is to introduce a bug in the code and run the test, to see if it fails.
Test suite is relevant only if it is kept in sync with code it tests.
There are two solutions here:
There is a pitfall in doing so: mocks are never a real thing! Testing against mocks only proves that code works with these mocks! There is almost no software in the world, that is 100% compliant with standards they support or even their own documentation (assuming that software has been around for a while). Yet, people for some reason think, that it is possible to keep mocks 100% identical in behavior to the real thing they imitate.
The real implementations evolve over time and mocks have to kept in sync. Sooner or later they diverge. For this reason integration and end-to-end tests are required, in order to make sure the code works with actual real implementations.
What matters in the end is the quality of the code and the quality of the tests. When both are good, no one cares, in what order they were produced.
One of the reasons for doing code review is that it is hard to spot problems in your own code. The same applies to tests - when else drills your code besides yourself, the chances of catching bugs increases.
Tests are written for others first, only then for yourselfThere are only few cases, where tests are written to check whether the code works. In most cases writing test is not the most efficient way to check. Instead, tests are written primarily to catch regressions when unrelated changes are made. Since it's quite easy to break something you don't know about, tests are written to prevent others to break something they possibly don't even consider.
As such, claims "I don't need tests" are pretty much void if there is more than one developer on the project.
Test that hasn't failed at least once has not been proven to test anythingShould be obvious, but if the test has never been red, how do you know that it actually tests something? Maybe the test is simply always green and will not catch any bug!
Tests are just like any other code, they have to be verified. The simple way to do this is to introduce a bug in the code and run the test, to see if it fails.
When code evolves, test suite should evolve with itThe only case when code changes not necessarily cause test changes is refactoring. In all other cases if code changes, but tests don't, the new features are not covered, so the test suite degrades.
Test suite is relevant only if it is kept in sync with code it tests.
Tests should test the smallest possible feature setThis is easier said than done. Isolating different features from one another can be difficult. Testing features is only one part. Ideally it should be easy to find, what got broken when test fails. If test depends on multiple features at the same time, failure of that test shows, that one of these features is broken, but not always tells which one.
There are two solutions here:
- Make tests depend only on one feature, so that test failure indicates a problem with that feature
- Order tests accordingly. If test depends on 3 different features, but 2 of them have been thoroughly tested before, a failure is likely caused by the third
Testing against mocks is inadequateIt is a popular suggestion by unit-tests proponents to mock everything to achieve single feature isolation.
There is a pitfall in doing so: mocks are never a real thing! Testing against mocks only proves that code works with these mocks! There is almost no software in the world, that is 100% compliant with standards they support or even their own documentation (assuming that software has been around for a while). Yet, people for some reason think, that it is possible to keep mocks 100% identical in behavior to the real thing they imitate.
The real implementations evolve over time and mocks have to kept in sync. Sooner or later they diverge. For this reason integration and end-to-end tests are required, in order to make sure the code works with actual real implementations.
Unit testing is inadequateShould be obvious: end users don't care, whether your tests are green or not. They care, whether software works or not. Unit tests can prove that individual components work, but they say nothing about the behavior, when those components are put together.
It's not important, whether code or test is written firstTDD zealots claim otherwise and they are wrong. While TDD can increase the coverage and quality of tests, it does not guarantee that!
What matters in the end is the quality of the code and the quality of the tests. When both are good, no one cares, in what order they were produced.
Only testing your own code is riskyin part this is another argument against TDD...
One of the reasons for doing code review is that it is hard to spot problems in your own code. The same applies to tests - when else drills your code besides yourself, the chances of catching bugs increases.
Only testing the correct behavior is inadequateOne common mistake made in automated tests is only verifying that code behaves correctly under correct conditions. For complete testing the opposite should also be tested: code should give errors under incorrect conditions. Do you have any additional rules to add?
Pranešimą parašė Aurimas Černius ties 13:10 Komentarų nėra:
žymės: programming
2014 m. rugsėjo 8 d., pirmadienis
Bakcward compatibility sins
Maintaining backward compatibility is more of most important values for every software library, tool or system used by other systems via it's API. However, as system evolves, maintaining compatibility gets harder and sometimes it's not possible to improve it in a desired way, because that would mean breaking compatibility. At those points a tough decision has to be made: maintain compatibility or break it.
The list bellow is not complete by any means, but it shows few examples where I doubt that being backward compatible was the right decision. I also add what I think was the right decision and what we can learn from mistakes made.
The list bellow is not complete by any means, but it shows few examples where I doubt that being backward compatible was the right decision. I also add what I think was the right decision and what we can learn from mistakes made.
- WinMain [dead parameter in rarely used function]
In Windows API, the programs entry point is as follows:
int CALLBACK WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow);
Note the second argument: it is always NULL!
The idea is, that this argument had a meaning in 16-bit Windows, but that was completely removed in 32-bit Windows. So, this parameter is in effect meaningless and is here just for backwards compatibility. While that seem to make sense at first, consider that Win16 and Win32 are not entirely compatible! Applications had to be migrated from one to another. And application has exactly one WinMain.
As a consequence, what you see here is short term backward compatibility (Win16 died quite soon after Win32 appeared) at the cost of long term API pollution. All for something as trivial as application entry point (that can be solved via preprocessor macro).
- WPARAM ["hungarian compatibility"]
In Windows the signature for Window Procedure is like this:
LRESULT WINAPI DefWindowProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam);
and the parameter in question is wParam, it's datatype to be exact.
The point here is that "W" stand for "WORD" in both datatype and parameter name. This was true in Win16 (WORD=2 bytes), but not anymore since Win32 (WORD datatype still is 2 bytes, but WPARAM now is 4 bytes).
There are two issues apparent here:
- Hungarian notation is a bad idea and one of the reasons is in front of you (if you haven't noticed - parameter name LIES to you)
- Generic datatypes (like int) are redefined as something else to make it possible to change them later. This was done in this case too, except that the name encoded the original type before and LIES to us now.
- Double.parseDouble(null) vs. Integer.parseInt(null) [bug-compatibility]
In Java:
Integer.parseInt(null) // throws NumberFormatException
Double.parseDouble(null) // throws NullPointerException
This inconsistency originated from old versions of Java and is kept here for backward compatibility. This is documented behavior, so it's "a feature".
What this actually is, is called bug-compatibility. The funniest part is that both these methods can throw NumberFormatException, so a fix is quite simple and hardly will break badly something. I mean, if you handle exception properly, it will just work, otherwise you probably have a quite buggy system, one more or less doesn't make a difference...
Most importantly, these two are very old. Double.parseDouble() dates to Java 1.2, no such number on the other, but probably around the same. YOU REALLY REALLY COULD HAVE FIXED THIS BACK THEN! Instead, Sun maintained backward, sorry, bug-compatibility, just to see the bug getting harder to fix later.
- Java generics vs. C# generics [focus on past, not on future]
Both languages fell into idea of object collections just to find out, that they destroyed a lot of type safety for more verbose coding (lose-lose situation, that is). How did they add generics later, without breaking languages backward compatibility?
Java went the hard way by turning existing non-generic into generic. They faced three issues:
- both non-generic and generic collections should be available (so that old code still compiles)
- convertibility between generic and old non-generic variants (mix old and new code)
- behavior compatibility (non-generic accepts anything, generic is limited)
- what happens is non-generic is converted to a generic with incompatible argument?
- how type-safety is controlled in new code, when under the hood is the old non-generic collection?
What went wrong here? Four issues:
- a generic collection can be passed to old non-generic code which is free to insert anything, that will only explode in new code!
- no generic type can still be casted to other one, even if arguments are compatible, you have to work that around via cast through non-generic collection
- generic only exists at compile time, no runtime type checking exists
- you can't forbid new stuff to be generic-only, it still can be used without generic arguments, where Object is assumed
- type safety of generic collection - it will simply never contain incompatible objects
- casting of references would simply work, as the protection is there at runtime
- passing generic collection to old code would reveal bugs (object of wrong type inserted) or show invalid assumptions about it ("oops, it's not String-only collection")
- C++ compatibility with C [not quitting in time]
So, C++ is designed to be compatible with C, that is "a valid C program is a valid C++ program", as they say... Well, not really for several reasons:
- the compatibility is lost with the first new keyword introduced (*caugh* class *caugh*) - what used to be a valid identifier, now is not
- C++ has different linkage because of name mangling, which makes it incompatible with C. Worse, now the C libraries are forced to add extern "C" markers under __cplusplus define, to make themselves compatible with C++
- enums and structs have tag names in C, but these are real type names in C++
What breaking ties with C would achieve:
- string literals can become real std::string objects with their functionality (like concatenation using "+")
- arrays can be std::array by default (being assignable is the first win)
- a lot of standard C library could be wrapped by C++ function that would accept C++ types (imagine printf() accepting std::string)
- forget extern "C", you could just have something like #cinclude for C headers
- A compatibility break, that is almost guaranteed to have a very small impact, is worth to do (WinMain)
- If you redefine some type via typedef, make new type more generic, so you can change it (i.e. "an integer of size, which is at least X")
- Hungarian notation is a bad idea, full one is ten times so
- Bugs should be fixed! A fix that breaks some small importance thing will give you few rants from people, who are the ones to ignore (I can't imagine good developer complaining about fixed bug, even if it broke something in his buggy code).
- New code or file format will gradually outnumber old one by large margin, thus look forwards, not backwards
- If you fail to maintain full compatibility, use it as opportunity to break for better future
- The number of "breaks" doesn't matter, what matter is overall pain introduced by compatibility break. So, if you broke something important, making minor things compatible wont help much.
- Bonus: it's not possible to maintain backward compatibility forever, plan break in advance and don't give false promises.
Pranešimą parašė Aurimas Černius ties 14:01 Komentarų nėra:
žymės: c++, java, programming
2014 m. liepos 14 d., pirmadienis
The lost war against duplicate code
From what I've seen so far, duplicate code is impossible to avoid in any large project. There are multiple reasons, how duplicate code is created and while it is typically assumed, that duplicate code is bad, this is not always the case.
Why duplicate code is bad
- Duplicate bugs - it's obvious: if bug is discovered in code, the same bug exists everywhere the same code is used, thus there are many places to fix, instead of one
- Hard to maintain - pretty much the same as previous, but more extended. In particular, you not only fix bugs, but also add features, optimizations and other improvements. Worse is that duplicate code diverges, making it harder to spot.
What "justifies" code duplication
- Easier to maintain - while we claim the opposite, this one has some truth in it. By copying code written by someone else you are free to change it in any way you want. Changing common code is harder and often requires agreement across multiple involved parties. Bust: it looks so, but it makes code base larger, which in turn makes it harder to maintain.
- More freedom to change - common code has to remain common, that is you can't add your specific features to it. The biggest problem with this is that it's an organizational issue: if code is duplicated to have more freedom to change it, it indicates a problem with management or company culture.
- Faster to develop - everything, that requires involvement of multiple parties, takes more time to do. Bust: short term gain, you usually lose in the long run (unfortunately short term gains is what many manager only care about).
How duplicate code happens
- Incompetence - it's sad, but there are a lot of bad developers. Many of the write code via copy-paste, and, as always, abusing copy-paste results in duplicates. This is what is often assumed when talking about duplicate code and yes, that is what we should fight.
- Forgot to refactor - this is trickier. It's like the first one except that the developer is actually not bad. It's fine to use copy-paste in order to make things work. The problem is that you have to refactor at the end. Not forgetting to that is the hardest part... There is a gray area between this and the first one. Code review might be an answer to this one.
- Too much trouble - sometimes avoiding code duplication is more trouble than worth. The place for common code might not exist! Create a library just for couple of functions? Don't forget, that this will bring entire maintenance hell for that library. Also there often is such thing as code ownership and shared code is owned by someone else. In short, we avoid code duplication to reduce problems, not to add new ones. When that is not the case, duplicating code can be acceptable.
- Created naturally - it's not impossible that two developers might actually write almost identical code. In large projects with a lot of people this does happen and might take a while to find, that two guys of completely different teams wrote almost identical helper function.
Pranešimą parašė Aurimas Černius ties 14:13 Komentarų nėra:
žymės: programming
Užsisakykite: Pranešimai (Atom)


text:
Aliases for A1CF Gene
Aliases for A1CF Gene
External Ids for A1CF Gene
- Entrez Gene: 29974
- Ensembl: ENSG00000148584
- UniProtKB: Q9NQ94
Previous GeneCards Identifiers for A1CF Gene
Summaries for A1CF Gene
Mammalian apolipoprotein B mRNA undergoes site-specific C to U deamination, which is mediated by a multi-component enzyme complex containing a minimal core composed of APOBEC-1 and a complementation factor encoded by this gene. The gene product has three non-identical RNA recognition motifs and belongs to the hnRNP R family of RNA-binding proteins. It has been proposed that this complementation factor functions as an RNA-binding subunit and docks APOBEC-1 to deaminate the upstream cytidine. Studies suggest that the protein may also be involved in other RNA editing or RNA processing events. Several transcript variants encoding a few different isoforms have been found for this gene. [provided by RefSeq, Nov 2010]
GeneCards Summary for A1CF Gene
A1CF (APOBEC1 Complementation Factor) is a Protein Coding gene. Among its related pathways are C6 deamination of adenosine and Gene Expression. GO annotations related to this gene include nucleic acid binding and nucleotide binding. An important paralog of this gene is HNRNPR.
UniProtKB/Swiss-Prot for A1CF Gene
Essential component of the apolipoprotein B mRNA editing enzyme complex which is responsible for the postranscriptional editing of a CAA codon for Gln to a UAA codon for stop in APOB mRNA. Binds to APOB mRNA and is probably responsible for docking the catalytic subunit, APOBEC1, to the mRNA to allow it to deaminate its target cytosine. The complex also protects the edited APOB mRNA from nonsense-mediated decay.


text:
The Blacksburg-Christiansburg-Radford area was ranked Top 5 on the recently published Forbes.com Best Small Cities for Jobs list. Looking at 242 MSAs, Forbes.com calculated the ranking using employment numbers from the Bureau of Labor Statistics for the period November 2000 through January 2012.
This ranking continues the positive recognition the region has received including a No. 4 rating on Site Selection magazine's Governors Cup for metro areas with a population of less than 200,000. Blacksburg, Va. was also named the No. 1 Best Place in the U.S. to Raise Kids by Bloomberg Businessweek.
The Blacksburg-Christiansburg-Radford MSA continues to receive accolades for a number of reasons. Home to top-ranked Virginia Tech, the area's workforce is highly educated, with two-thirds of residents above the age of 25 holding a bachelor's degree or higher and 40 percent holding a graduate or professional degree.
The research capabilities of Virginia Tech combined with a highly-educated workforce have proven to be a winning combination, attracting companies and research parks to the area. The Virginia Tech Corporate Research Center, located adjacent to Virginia Tech's main campus, is home to 140 high-tech companies which employ more than 2,200 Virginians.
The Blacksburg-Christiansburg-Radford MSA is able to retain its highly-skilled workforce due to the strong quality of life the region offers. The family-friendly community provides residents with numerous recreational activities due to its convenient access to the Appalachian Trail, Washington-Jefferson National Forest, Smith Mountain Lake and New River.
To learn more about the Commonwealth's plentiful resources — including a world-class workforce, top-ranked education system and strong quality of life — that make Virginia America's Top State for Business, click here.
Congratulations to Virginia State University's (VSU) Reginald F. Lewis School of Business for winning three awards over the last few months.
Last week, VSU's business school was awarded the RichTech Technology Innovation Deployment Award for its creative use of technology to enhance a process. RichTech honors organizations that help advance Virginia's technology-based economy.
This win was a nice follow-up to the "Best Business Program in the Country" award received earlier this month from The Center for Historically Black Colleges and Universities (HBCU). The Center for HBCU ranked VSU's business school No. 1 for its commitment to innovation.
Last September, VSU's business school received the Governor's Technology Award in the category of Innovation in Higher Education. The award was presented at the Commonwealth of Virginia Innovative Technology Symposium in recognition of the most creative initiatives in the public sector.
All three awards recognized the business school's "Digital at the Core" initiative. As the first school in the country to delivery its core curriculum primarily via digital format, the school launched its pilot program in the fall of 2010. Digital textbooks, MP3 audio chapters, MP3 study guides, quizzes and flashcards were all available via download for a cost-friendly licensing fee of $19.95.
Founded in 1882, VSU is an example of Virginia's premier higher education system that partners with industries to prepare students with the technological training and skills they will utilize upon entering the workforce.
To learn more about Virginia's highly skilled workforce as well as customized training and recruitment programs, click here.
Congratulations to Loudoun County for winning another expansion from data center provider, Digital Realty. The company officially broke ground on its fourth building in what's known as "Data Center Alley" in Loudoun County, Va.
The two-story, 214,000-square-foot building will house 10 data centers and bring an $80 million investment along with 180 temporary positions and 12 full-time jobs to the area. With more than 50 percent of the world's internet traffic flowing through Loudoun County each day, the region certainly has become a hub for leading data center operations. Add to that an energy rate 28 percent below the national average and 10 million square feet of data center capacity, and one can easily see why data centers are flocking to Virginia.
Data processing was actually the dominant sector across the Commonwealth in 2011, accounting for more than $960 million in capital investment and almost half of the nonmanufacturing investment. Virginia is poised to continue its growth in the sector as it has both the highest concentration of high-tech workers in the nation and the advanced telecom infrastructure across the Commonwealth to support the industry.
Virginia data centers claimed three of the top 10 spots in Southern Business & Development's 2011 Ten Best Data Center Sites in the South list. In addition, Bristol, Va., was touted in the study Broadband at the Speed of Light as one of the first municipalities in the nation to build a citywide Fiber-To-The-Home network.
To learn why leading companies have invested more than $4.4 billion in Virginia data centers over the last ten years, click here.
State, local and company officials celebrated the opening of Digital Realty's newest building at the groundbreaking ceremony in Loudoun County.
Governor McDonnell and Lieutenant Governor Bolling attended the ribbon-cutting ceremony in Henry County, Va., to celebrate the opening of ICF International's Business Process Management operations center. The opening of the facility comes just over a year after the Governor announced the project would bring 539 new jobs and a $15 million investment to Southern Virginia.
As a global professional and technology services firm, locating near a skilled workforce is critical. Following the company's $20 million expansion of its Fairfax County headquarters in 2010, this project is further validation of the strength of Virginia's workforce across the state.
This victory also illustrates the breadth of Virginia's technology infrastructure, another key deciding factor that helped the Commonwealth compete against Georgia, Maryland, Tennessee and West Virginia. Companies in Southern Virginia can take advantage of Mid-Atlantic Broadband Cooperative's 800 mile open-access, fiber optic broadband network.
In the words of ICF International Chairman and CEO Sudhakar Kesavan, "ICF is proud to expand its operations in Virginia and to call the Commonwealth its home. As a professional services firm, ICF International maintains its global headquarters here, which offers the best combination of a robust economy, a pro-business climate, a high-quality workforce, and an outstanding quality of life for ICF employees. We are pleased to open this new operations center in Henry County and to build our workforce from local residents."
With the highest concentration of technology workers in the country, Virginia continues to attract world-class companies and gain recognition as the Top State for Business. To learn more, click here.
Governor McDonnell addresses the crowd at ICF International's ribbon-cutting ceremony in Martinsville, Va.
Site Selection magazine named Virginia the winner of its annual Competitiveness Award, which recognizes excellence on the part of a state-level economic development group. The Virginia Economic Development Partnership (VEDP) accepted the award at the Industrial Asset Management Council's Spring Professional Forum held in Austin, Texas.
The Competitiveness Award was based on a 10-factor index using Conway Data Inc.'s New Plant database. The number of new and expanded facilities, capital invested in new and expanded facilities, total jobs created, the individual state tax climate and state unemployment rate were a few of the factors used in selecting the Commonwealth as the winner.
Virginia's low-tax business climate, right to work status and competitive operating costs were just some of the benefits touted by Site Selection. Add to that a world-class transportation infrastructure, robust telecommunications network, and a tech-savvy workforce, and it's easy to see why Virginia is the clear winner.
This award continues the positive recognition the Commonwealth has seen in 2012. Virginia has already been recognized with a Top 3 Economic Outlook Ranking from the American Legislative Exchange Council's Rich States, Poor States study, a Top 5 ranking in Site Selection's Governor's Cup, a Top 3 ranking on Gallup's Job Creation Index, and a Top 10 ranking on Chief Executive's Best States for Business.
To learn why Virginia continues to garner attention as a top state for business, click here.
Mark Arend, Site Selection Editor in Chief, presents VEDP representative Brent Sheffler with the Competitiveness Award.
Alleghany County won a new manufacturing operation when Balchem Corporation decided to locate its first operation in the Commonwealth there. The project will bring an initial investment of approximately $10 million and 55 new jobs to the region over the next 2-3 years.
As a leading producer of encapsulated ingredients for the animal nutrition and health market, Balchem's growing portfolio of products has gained strong market acceptance at a global level. The manufacturing facility in Covington, Va., will allow Balchem to build on this success by more than doubling its output capacity for this market.
Virginia's strong manufacturing workforce, rich raw material supply and competitive overall cost structure weren't the only reasons the Commonwealth was selected for this project. Alleghany County's strategic location was also a critical factor in the selection process. Direct access to Interstates 64 and 81 will provide the company with convenient access to customers in the Northeast and Midwest markets, and close proximity to Virginia's world-class port system will allow Balchem to easily serve its international customers.
A 45-year-old, publicly-traded company, Balchem was ranked #29 on Forbes.com's 2011 America's Best Small Companies list. To learn more about Virginia's extensive manufacturing capabilities and why the Commonwealth continues to attract top companies like Balchem, click here.
Yesterday, DRS Technologies announced it would relocate its corporate headquarters from New Jersey to Arlington County, Va. The company will expand its Virginia presence to more than 100 employees, bringing a capital investment in excess of $10 million to the region.
The defense technology leader is a subsidiary of Italian conglomerate Finmeccanica S.p.A., a top ten global defense and aerospace leader. DRS Technologies develops a wide range of mission-critical systems for homeland security and military needs.
The Governor met with company officials at the Farnborough International Air Show in summer 2010.
Virginia was chosen for the company's new headquarters location due to its proximity to key customers in the D.C. area, as well as the company's positive experience with Virginia's pro-business regulatory environment and tech-savvy workforce. Virginia has the highest concentration of high-tech workers according to Cyberstates 2011.
To learn why major defense companies such as DRS Technologies, Northrop Grumman, ITT Exelis and ATK have all recently selected the Commonwealth for their headquarters location, click here.
L-3 Communications spin-off Engility Corp. announced yesterday that it would establish its new corporate headquarters in Fairfax County, Va. The project, a positive result of the Governor's recent marketing mission to New York and Canada, will bring 50 new jobs and a $6.5 million investment to Northern Virginia.
With more than $2 billion in sales and 9,200 employees worldwide, Engility Corp. is a leading professional services firm providing systems engineering and technical assistance support services to numerous government agencies, including the Department of Defense. Virginia's proximity to the company's key markets and customers was a deciding factor for this headquarters location.
L-3 Communications' existing presence in the Commonwealth and positive experience with Virginia's highly-skilled workforce and pro-business tax structure led Engility to choose Virginia over its competition in Maryland.
As part of the professional services industry, Engility's new headquarters location builds upon the success Virginia has shown in the sector. Professional services was the Commonwealth's top sector for job creation in 2011, announcing 12,769 new jobs. With human capital as the major input, the sector's 108 percent growth over the last year illustrates the driving force of Virginia's world-class workforce.
To learn more why companies continue to select the Commonwealth for their headquarters locations, click here.
New industry study Broadband at the Speed of Light details how three communities, including Bristol, Va., took matters into their own hands to develop some of the top broadband networks in the country.
Published by the Institute for Local Self-Reliance (ILSR) and the Benton Foundation, the study details a growing trend — rather than relying on the slower pace of private sector telecommunications expansion, community leaders are successfully designing and implementing their own public broadband networks.
Bristol is touted as one of the first municipalities in the nation to build a citywide Fiber-To-The-Home (FTTH) network that offers telephone, cable television and Internet broadband access. The local power utility, Bristol Virginia Utilities, launched its fiber optic network in 2003 under the name OptiNet.
Study author Christopher Mitchell noted that Bristol's residents have "faster and lower cost access to the Internet than anyone in San Francisco, Seattle or any other major city."
With a take rate above 70 percent, OptiNet has since expanded outside of Bristol to nearby businesses and industrial parks, helping to create hundreds of jobs for Virginians. Named the 2009 Community Broadband Fiber Network of the Year by the National Association of Telecommunications Officers and Advisers, the network has also been praised in The Economist and in the FCC's National Broadband Plan for America.
OptiNet is not the only technology investment Southern Virginia has seen. Several years ago the Mid-Atlantic Broadband Cooperative established an 800 mile open-access, fiber-optic broadband network, attracting Gigaparks and technology companies to the former tobacco region.
High-speed broadband infrastructure has become an increasingly important component to business expansion decisions, allowing Virginia to remain competitive on a global level. The expansions of companies such as Microsoft, Northrop Grumman, CGI and Alpha Natural Resources in the region are due in part to the availability of a high-speed network.
To learn more about Virginia's strength as a technology leader and why companies continue to locate in the Top State for Business, click here.
Earlier this week, Lieutenant Governor Bill Bolling joined McKesson officials to celebrate the grand opening of the company's new medical distribution center in Caroline County. Initially announced in August 2010, the new, state-of-the-art distribution center will allow McKesson to better serve its domestic and international customers, bringing 150 new jobs and a $50 million investment to Virginia.
Ranked 15th on the Fortune 500, McKesson is the largest pharmaceutical wholesaler in North America, distributing one-third of all medicines used each day. McKesson's selection of Virginia over Maryland and Pennsylvania confirms the Commonwealth's strong advantages for companies vested in global logistics.
The new distribution center will enhance McKesson's total supply chain efficiency as well as extend the company's footprint in Virginia. Building off the McKesson Medical Surgical corporate office in Richmond, this new distribution center will bring the company's employee base in Virginia to more than 600.
Virginia offers several advantages for distribution centers, including easy rail access, six major highways, one of the largest container ports on the East Coast, and the third largest state-maintained transportation network in the country.
To learn more about why the nation's leading distributors are locating in Virginia, click here.
In its fifth edition of Rich States, Poor States the American Legislative Exchange Council rated Virginia in the top three for its 2012 Economic Outlook Ranking. This forward-looking ranking comprises 15 equally weighted state policy variables, including personal and corporate tax rates, as well as worker's compensation costs, right-to-work status and even the quality of the state legislature.
As the highest ranked state in the region, Virginia definitively outshined its competition. With a corporate tax rate of six percent that remains unchanged since 1972, a right-to-work regulatory environment, and an unemployment tax burden that is 32 percent lower than the national average, it is easy to see why this is the second consecutive year the Commonwealth has made the top three in this study.
Virginia's pro-growth economic policies offer companies long-term incentives to invest in the Commonwealth. For example, Virginia was able to successfully compete against nearby Maryland on a number of recent headquarters relocation announcements, including Northrop Grumman, ITT Exelis, Bechtel Corp. (divisional headquarters), Acentia and Alpha Natural Resources.
To learn why Virginia is consistently ranked America's Top State for Business click here.
Return to blog homepage
The Virginia Economic Development Partnership (VEDP), a state authority created by the Virginia General Assembly to better serve those seeking a prime business location and increased trade opportunities, provides confidential site selection and international trade services. VEDP's mission: To enhance the quality of life and raise the standard of living for all Virginians, in collaboration with Virginia communities, through aggressive business recruitment, expansion assistance, and trade development, thereby expanding the tax base and creating higher-income employment opportunities.
© Copyright 2016


text:
No. 10: The Ravens will make the playoffs for a sixth straight season
The Ravens have made the playoffs every season since they hired John Harbaugh as head coach and drafted Flacco in the first round in 2008. They will be challenged by a young, stacked Cincinnati Bengals squad in the AFC North, and you can never count out the Pittsburgh Steelers as long as Ben Roethlisberger still has a pulse. But bet on the Ravens being back in the playoffs in 2013. And as we saw last season, once you get into the tournament, anything can happen.
Jessica Rinaldi / Reuters
Copyright © 2016, Orlando Sentinel