Tim Patrick's Blog, page 14

October 7, 2016

VSM: Default Access Levels in C# and Visual Basic

Visual Basic and C# are two programming languages separated by a common, well, language. As the two key programming tools in Microsoft’s .NET platform, they overlap a fair amount. But there are aspects of each language that reveal their core personalities and how they differ. One example shows up in my latest Visual Studio Magazine article.


The article deals with access levels, language keywords that alter the amount of code in a project that can access a specific piece of data or action method. In the absence of these keywords, C# and Visual Basic behave differently, and in ways that are in line with the original purposes of each language.


To find out exactly how the languages behave, please read the original article on the Visual Studio Magazine web site.


[Image Credits: Visual Studio Magazine]

 •  0 comments  •  flag
Share on Twitter
Published on October 07, 2016 12:00

October 5, 2016

The President as the Tool of the Congress

Every four years, the nation borders on near-psychosis as it forms battle lines over who will be the next President of the United States. From the nationwide televised debates to yard signs in front of your neighbor’s home, practically every square foot of America is begging you to vote for that one candidate who will, in Messiah-like fashion, save this nation from its tribulations. However, the original vision of the president as proposed by the constitutional framers completely omitted the expressed will of the people.


Our modern Constitution emerged from a convention held by the states in 1787. Article Two of that document describes the Executive Branch, and the method of selecting the President through the Electoral College. But early proposals for that branch included neither the Electoral College, nor a national popular election of any kind. Instead, the president was to be selected by the Congress, with members of both the House and the Senate identifying their choice for the Executive. Under this scenario, the American public, by voting for their own congressional representatives, had only an incidental role to play in selecting the Commander in Chief.


The specific idea of a president selected by members of Congress was brought before the delegates on June 13, 1787, as documented in James Madison’s extensive notes from the convention. His summary of the session on that day includes a proposal for a structure of government that would replace the existing Articles of Confederation with a new multi-branch federal system. Part of that summary describes the Executive, a single person to be selected not by the people, but by the National Legislature—the Congress—and then only for a single seven-year term.


Resolved that a National Executive be instituted to consist of a single person, to be chosen by the Natil. Legislature for the term of seven years, with power to carry into execution the national laws, to appoint to offices in cases not otherwise provided for—to be ineligible a second time, & to be removeable on impeachment and conviction of malpractices or neglect of duty—to receive a fixed stipend by which he may be compensated for the devotion of his time to the public service to be paid out of the national Treasury.


This brief overview of the powers and the duties of the president includes features that found their way into the final document, including the presidential ability to appoint unelected officers, and the risk of impeachment. The executive selection by the legislature didn’t make the final cut, but its inclusion in this early resolution, alongside other ideas that survived, shows how reasonable they considered the proposal.


The modern cry of populism and an unfulfillable desire for national egalitarian perfection make the very idea of a president selected by a thoroughly disliked congressional body seem ludicrous. Americans today identify with their presidential candidate, that it is “their president.” By the framers didn’t see it this way. Instead, they expected that the part of the government most closely aligned with the will of the public would be the House of Representatives. We no longer place our hopes in that body, but instead devolve our expectations on the Office of the President, an office that was never designed to accomplish the things we expect it to do today.


[Image Credits: Signing of the US Constitution, by Junius Brutus Stearns, 1810-1885]

 •  0 comments  •  flag
Share on Twitter
Published on October 05, 2016 12:00

October 3, 2016

A Visit to the Local Coffee Roaster

Last Thursday, September 29, was National Coffee Day, and to celebrate, I attended an open house hosted by a local coffee roaster. It seems strange to say that, not only because I’m relatively new to the entire coffee-drinking thing, but also because saying “local coffee roaster” feels a bit like saying “local jumbo jet manufacturer.”


In-house roasting is the new big thing in coffee. Seattle tourism options now include a trip to the Starbucks Reserve Roastery and Tasting Room, a 15,000-square-foot shrine to the daily Pacific Northwest ritual of consuming bigger-than-Venti beverages. But roasting is no longer the exclusive domain of the market giants. Thanks to computer-controlled small-scale roasting equipment and a public thirst for espresso that seems to have no end, even local, single-location coffee houses are able to serve up their own custom blends.


In my part of the country, Mela Coffee Roasting Company embodies this drink-local trend. At last week’s opening of their new roasting facilities, the team the runs the roasting operation—just four people!—personally guided coffee lovers past burlap sacks of newly arrived green coffee beans, through the cupping room where the flavor profiles are reaffirmed on a daily basis, and finally to the Diedrich roasting machine that allows Mela to produce its own coffee stylings.


Mela serves up this brew at their local café, a typical coffeehouse complete with hipster breakfast options, an assortment of pastries, local art on the walls, and frequent music performances.


If you can’t make it down to the café for your daily fix, restaurants and stores all over town serve up Mela’s standard product lines. In that way, they aren’t that different from a can of Folgers. But as local coffee roasting enters the mainstream, some coffee-serving businesses are asking more from their hometown roasteries. Beyond their official blends, Mela has developed custom flavor profiles for a handful of local businesses, including for a competing coffee shop about thirty miles down the road.





#td_uid_1_57f3557c464fc .td-doubleSlider-2 .td-item1 {
background: url(http://wellreadman.com/wp-content/upl...) 0 0 no-repeat;
}
#td_uid_1_57f3557c464fc .td-doubleSlider-2 .td-item2 {
background: url(http://wellreadman.com/wp-content/upl...) 0 0 no-repeat;
}
#td_uid_1_57f3557c464fc .td-doubleSlider-2 .td-item3 {
background: url(http://wellreadman.com/wp-content/upl...) 0 0 no-repeat;
}
#td_uid_1_57f3557c464fc .td-doubleSlider-2 .td-item4 {
background: url(http://wellreadman.com/wp-content/upl...) 0 0 no-repeat;
}
#td_uid_1_57f3557c464fc .td-doubleSlider-2 .td-item5 {
background: url(http://wellreadman.com/wp-content/upl...) 0 0 no-repeat;
}
#td_uid_1_57f3557c464fc .td-doubleSlider-2 .td-item6 {
background: url(http://wellreadman.com/wp-content/upl...) 0 0 no-repeat;
}
#td_uid_1_57f3557c464fc .td-doubleSlider-2 .td-item7 {
background: url(http://wellreadman.com/wp-content/upl...) 0 0 no-repeat;
}








1 of 7













Mela Coffee







Mela Coffee







Mela Coffee







Mela Coffee







Mela Coffee







Mela Coffee







Mela Coffee
 •  0 comments  •  flag
Share on Twitter
Published on October 03, 2016 12:00

September 30, 2016

VSM: Experiencing Nothingness in C# and Visual Basic

Back in June, I became an official “regular contributor” to Visual Studio Magazine, and began crafting a series of articles on the overlap between the Visual Basic and C# languages. The second article in the series bears the title “Experiencing Nothingness in C# and Visual Basic,” but don’t let the title fool you. There’s something of substance in there.


The article covers the .NET concept of null, or Nothing as it is known to Visual Basic developers. Null is the absence of data, and both of the key .NET languages make regular use of it. But there are important, and sometimes troubling, differences in how C# and Visual Basic interact with this void of data.


To discover the inner secrets of .NET nothingness, read the full article on the Visual Studio Magazine web site. When you’re finished with that content, don’t forget to return here to ensure that nothing on this site has gotten past you.


[Image Credits: Visual Studio Magazine]

 •  0 comments  •  flag
Share on Twitter
Published on September 30, 2016 12:00

September 28, 2016

Review: Quick Mastery of Vocabulary

I put off my Japanese studies for the past year while I finished up my new C# and Visual Basic textbooks. But last week I started again in earnest, in yet another desperate attempt to break through the wall of my rudimentary knowledge of the language. As they say, the twenty-seventh time’s the charm.


This time around, I’ll be using a new resource to help build up my core vocabulary. The book has a decidedly Japanese-language title on the cover: 日本語単語スペード・マスター. The transliteration is “Nihongo Tango Speed Master,” but this isn’t your mother’s tango dance, especially since “tango” means “word” in Japanese.


Embellished with the English subtitle “Quick Mastery of Vocabulary,” the book is part of a series that assists language students trying to pass the various levels of the Japanese Language Proficiency Test. This volume is the “Standard 2400” edition for those taking the N3 version of the exam. While the book is at its core a list of 2,400 essential vocabulary words, each page includes ample examples of the words in context, plus translations of those words and sentences into English, Korean, and Chinese.


Quick Mastery of VocabularyThe included red plastic sheet helps with the study by covering up the non-Japanese translations.

I just started the book two days ago, and have yet to pass page three. But already the book has me seeing red. That’s thanks to the red-colored plastic sheet that covers up the non-Japanese content. It’s supposed to prevent cheating, and it’s surprisingly effective. Each of the book’s fifty-four sections covers a specific category of words, including time, weather, money, and society. It’s a lot of reading and memorization, but the text also includes a CD that helps reinforce the book’s content through listening comprehension exercises.


If you have reached an intermediate level of Japanese language proficiency and are looking to enhance the number of core words stuck in your brain, click the button below to get a copy of the book.


buyfromamazon

 •  0 comments  •  flag
Share on Twitter
Published on September 28, 2016 12:00

September 26, 2016

Barna’s State of the Church 2016

America has long been identified as a “Christian nation.” From the historically clear preference for Protestant and Roman Catholic spiritual practices by its citizens, to the infusion of biblical language in everyday conversations—think “go the extra mile” and “writing on the wall“—the influence of Christianity on American culture is extensive and long-lived. But will it stay that way? That’s the question taken up by the Barna Group, a Gallup-like statistical research organization that focuses on the church and religious practices in the United States.


Each year, Barna releases its “State of the Church” analysis, and the statistics presented in the 2016 update should come as no surprise to anyone taking even a casual look at American society. In short, Christian beliefs and church attendance have been trending down since at least World War II. (A related Gallup study on religion shows that church attendance for Christians had dropped from 91% of Americans in 1948, to just 61% by 2015.) The Barna report calculates that just 73% of Americans now self-identify as Christian, though only 31% of US adults qualify as “practicing Christian,” those who attend a church service at least once per month.


The report spends a lot of time discussing the idea of “post-Christian” Americans, those who meet at least nine of a set of fifteen religious qualities, including “do not believe in God,” and “disagree the Bible is accurate.” In the 2016 report, Barna puts 48% of American adults in this group, which means that a significant portion of self-identified Christians are in fact post-Christian.


Despite the gloom that believers might experience from the study, Barna includes moments of hope, pointing readers to non-congregational indicators that may paint a more positive picture. “While regular church attendance is a reliable indicator of faithful Christian practice, many Americans choose to experience and express their faith in a variety of other ways, the most common of which is prayer.” Such an emphasis is in line with the overall Barna understanding of the modern church. In his 2005 book Revolution, George Barna, the founder of the Barna Group, used his background in church statistics to predict a future for the American church that favored a more personal experience rather than the traditional congregational focus.


The “State of the Church 2016” report is now available for your review on the Barna Group web site. To obtain a copy of George Barna’s book Revolution, click the button below.


buyfromamazon


[Image Credits: Barna Group]

 •  0 comments  •  flag
Share on Twitter
Published on September 26, 2016 12:00

September 23, 2016

VSM: Conflicts in C# and Visual Basic

Back in 2015, I published the C#-Visual Basic Bilingual Dictionary, a book that helps .NET developers understand C# code from a Visual Basic perspective, and vice versa. I needed the information in the book for a project I was working on, and I always expected that the target audience for the book would be on the small side. But it turns out that .NET programmers who deal with both languages are everywhere. And so Visual Studio Magazine, one of the key publications for .NET developers, asked me to publish a series of articles dealing with differences between the two languages. The first article in that series came out in June 2016.


The article is called “Conflicts in C# and Visual Basic,” and it deals with the potential identifier conflicts that can occur when an overall .NET solution includes both C# and Visual Basic elements.


To read the full article, browse over to the Visual Studio Magazine web site. After you consume the article, be sure to leave comments, or read the other great articles found on that web site.


[Image Credits: Visual Studio Magazine]

 •  0 comments  •  flag
Share on Twitter
Published on September 23, 2016 12:00

September 21, 2016

Meme Clarity: Woodstock, North Dakota

Welcome to Meme Clarity, the exciting Facebook-based game where we deconstruct and evaluate your favorite Facebook memes to discover what your friends really believe, and what they don’t. I could explain how the game works, but how about we just start!


This week’s meme comes courtesy of Tyler, a high school student in Fayetteville, Arkansas. He posted a photo on his Facebook page that showed protesters in North Dakota trying to stop construction of the Dakota Access petroleum pipeline. The original post on September 14 came with this bombshell: “This is why the media won’t show the protest on the pipeline.” The photo quickly went viral, racking up more than 400,000 Facebook shares in less than a week.


The image presents a vast swath of humanity, perhaps tens of thousands of activists, all gathered for a single purpose. The photo also includes some of the lush, green, rolling hills of the Midwest plains, and in the distance, forests of verdant trees so common on the vast North Dakota flatlands. Oh, and also lies. Lots of deceptive lies.


The photograph in question actually depicts the famous 1969 Woodstock festival in New York state, and not alternative energy protestors or members of the Standing Rock Sioux tribes trying to stop an oil pipeline passing through south-central North Dakota. In other words, the photo is a lie.


In one of my recent articles on the minimum wage in America, I stated that when some politicians use the term “fair wage,” they engage in “deceptive terminology, emotional manipulation, and propaganda.” Some of the commenters took issue with this strong statement. But I stand by it, not because I have some magical insight into what makes a wage fair, but because the politicians in question did, in fact, attempt to make their arguments through false statements, a misuse of terminology, and misdirection away from the core issues.


In modern American political thought, telling blatant lies in support of your deeply held opinions is considered valid and worthy of viral praise. I would be concerned enough if high school students from Fayetteville, Arkansas, were the only ones spreading such falsehoods. But the tactic is now commonplace, with even our top picks for the presidency joining in on the deceptions. Whether it is claims of racial bias in police shootings or debates over how women make only 78 cents for each dollar earned by a man, lies are the new evidence.


There are legitimate arguments to be made about political hot-button issues. Energy technologies like hydraulic fracking and shale gas extraction bring with them valid concerns over human and environmental safety, and discussing the dangers is warranted. Instances of race- and gender-based discrimination do occur, even in this supposedly enlightened era, and exposing such forms of bigotry is important. But at some point, the most vocal advocates for these issues began looking to lies and distortions as their communication tools of choice.


The problem with allowing such lies into the national discussion is that they strip us of our political will. Americans have long understood that politicians will bend the truth in order to achieve a political victory. In the past, such leaders had to use this superpower sparingly, because you never knew when an informed citizen would call them out on their deceit.


Today, politicians and advocates for change no longer worry about such trifling matters as truth or conflict from those who disagree. A less educated electorate is a major part of the problem. But as with this viral photo, public policy has become a form of entertainment. Perhaps Tyler only wanted to play a little joke on those in his Facebook circle. But at some point, he found value in supporting the North Dakota protesters with content he knew to be false. In his own comment on the original photo, Tyler quips, “I made the news for a viral hoax picture of the protest lol.” And thanks to the core lie, he did make the news, in all senses of the word.


Mark Twain famously said, “A lie will go round the world while truth is pulling its boots on.” But it turns out that this, too, is a lie, since it was actually Charles Spurgeon who said it back when Twain was still a teenager. If only Twain had access to the internet back in 1859. He might have put that upstart Spurgeon in his place.


[Image Credits: Facebook, but really, Getty Images]

 •  0 comments  •  flag
Share on Twitter
Published on September 21, 2016 12:00

September 19, 2016

Well-Read Man Site Refresh

If you’ve been a regular visitor to the Well-Read Man project site over the years, or even if you are a first-time visitor, you have no doubt noticed that the look and feel of the site is—what’s the word I’m looking for…oh yeah—ugly. That’s because I designed it myself, and as a full-time software developer for more than three decades, I didn’t have time to learn about things like style and drawing straight lines.


All that is about to change. The Well-Read Man site is, at its core, a WordPress site. WordPress is a popular Content Management System, and if you know a bit of computer programming—and I do—you can customize it to meet your needs. But that’s only if your needs are within your grasp. If, like me, you don’t have the artistic temperament, you can obtain, for little or no cost, prebuilt WordPress templates that provide the illusion of raw talent.


Over the past few weeks, I’ve been looking into different templates. Some of the free options are quite basic, providing little more than a 2016 twist on what my site already offers. But if you are willing to plunk down some plastic at your Visa card’s standard interest rate, you can buy a template that is beautiful out of the box, and that can be customized in your image using tools that even art-phobes like me can comprehend.


After many hours comparing features and options, I finally settled on a template called Newspaper, from a vendor named tagDiv. It looks awesome, or at least, it looks like it can do awesome things. It remains to be seen if I can wield the power appropriately. But if all goes well, you will see a transformation to this site occur in stages over the next few weeks. (If you are interested in other template options, here are some of the top contenders that I decided against: MagOne, NewsDesk, WooHoo, Goliath, and Master.)


Beyond the beauty, content changes are also coming to the site. Starting this week, articles will be more frequent, and will cover a more consistent range of topics. I’ll still talk about books, technology, and politics. But I’ll also add articles on philosophy and religion, humor, history, and other topics of interest to both you and me.


I look forward to the changes coming to the site, and I hope you will enjoy them with me. As the updates roll out on the site, be sure to let your friends know that they can read along with you directly on the Well-Read Man web site, through an email subscription, by following an RSS feed, on Facebook, or via Twitter.


[Image Credits: tagDiv]

 •  0 comments  •  flag
Share on Twitter
Published on September 19, 2016 12:00

September 13, 2016

We Want Unfair Wages

Unfair Wages


During this election season, there have been a surprising number of calls for unfair wages. The demand shows up in candidate speeches and on protester placards. It’s even found in the official platform of the Democratic Party, where they call for a national $15 per hour minimum wage.


That platform document actually calls it a “fair wage for all workers.” But it must be a typo, since the specific demand appears to have nothing to do with fairness at all.


I don’t claim to be an expert in fairness, but if I wanted to pay my employees fairly, I would base the wage on the type of work to be done, and on the skill of the employee doing the work.


For example, if I had a company called Tim’s Brain Surgery Specialists, I would pay my brain surgeons in line with the nature of the work. If I was able to charge my customers, say, $50,000 for routine brain surgery, I would pay the surgeon a portion of that price, after first deducting things like overhead expenses, taxes, pints of blood, anesthesiologist services, and so on. If the surgeon was particularly adept at fixing brains, I might pay a little more. Mediocre surgeons would be paid less. But in general, the pay would be based on the nature of the work, the value of the service, the quality of the employee’s work, and the revenue that work was able to bring to the company. That would be fair.


I would not base the wage on qualities of the employee that had nothing to do with the work. I would not consider, for example, whether the employee owned a car, or a comfortable house, or how many kids he or she had. If I paid one surgeon more because he had three kids, it wouldn’t be fair to the childless surgeon also in my employ.


The same system would apply to Tim’s Coffee Shack. The wage provided to each employee would depend on the skill of that employee in providing beverages to my customers. I might pay some employees more if they were good at making lattes, while those with poor brewing skills would be paid a little less. But in all cases, the wages would be based on the value those employees provided to the company, and the value provided to customers as reflected in the amount each customer was willing to pay for coffee.


Most customers are unwilling to pay as much for a coffee as they are for brain surgery. This might seem unfair, given how good some coffee drinks can be. But because coffee has less value than brain surgery, I would need to pay my baristas less than I do my surgeons. When you take into account the effort needed to become a brain surgeon, especially when compared with the entry-level effort needed to steam milk, it seems fair.


Let’s say that I pay my baristas $11 per hour. If these baristas actually provide $50 per hour in value to my company, it might be unfair that I pay them so little. On the other hand, if they provide only about $8 per hour in value to the company, then it is still unfair, but the person being shortchanged would be me. My goal is to pay my employees as close as possible to the value that they provide to the company, since that would be the most fair. And I would do it without regard to their non-work circumstances, since taking their personal lives into account would be unfair.


And here’s where the unfair wages demanded by some politicians come into play. If I determine that my baristas (or my brain surgeons, for that matter) provide $11 per hour in value to my company and my customers, and I pay them accordingly, a demand by the government that I pay them $15 per hour would be inherently unfair, because it would not be based on the value of the work, but on some other external factor attributed to the employee. In the case of the Democratic Party platform, that external factor is the belief that “no one who works full time should have to raise a family in poverty.” It’s a very laudable statement, but as we have already determined, setting a wage based on attributes of an employee that are unrelated to the work is unfair to other employees who do not share that attribute. Even if I pay all of my $11-level employees the mandated $15 per hour, treating them all equally, it sets up an unfair situation for those who actually provide $15 per hour in value to the company.


As an employer, I may voluntarily pay my employees more in order to ensure that they do not “have to raise a family in poverty.” I would probably need to charge customers more to pay for the higher salaries. But I would be deluding myself if I claimed that such a wage increase was due to the value the employee provided to the company, or that it was inherently fair. It might be a great thing to do as an employer, but it is great independent of whether it is fair. Because it has nothing to do with fairness.


Now you might be thinking, “Tim, those are valid points, perhaps even inspired. But what’s not fair is that hard-working Americans can’t afford to put food on the table. We need a safety net. We need compassion.” I get that, although this aspect of fairness has nothing to do with the work value that the employee provides to a business. Instead, the claim is that there is something inherent in the nature of life on planet Earth, or even just in America, that makes hard work for low pay unfair. Given the pluralistic and secular nature of our government and societal structures, and the hard reality of human history, I doubt this could be proven. There is certainly room for compassion, and ample opportunities for such compassion exist without resorting to lies.


Americans absolutely have the legal right to enact a minimum wage for all employees. But achieving that result through deceptive terminology, emotional manipulation, and propaganda is the very definition of unfair.


[Image Credits: David Playford, from freeimages.com]

 •  0 comments  •  flag
Share on Twitter
Published on September 13, 2016 12:00