Glen Mazza's Weblog

https://glenmazza.net/blog/date/20210320 Saturday March 20, 2021

Fifty Best Songs for Swing Dancing (aka Lindy Hop)
Source: Me

Andrews Sisters - Bounce Me Brother With a Solid Four
Andrews Sisters & Bing Crosby - Ac-Cent-Tchu-Ate The Positive
Archies - Sugar, Sugar
Louis Armstrong & Ella Fitzgerald - Frim Fram Sauce
Louis Armstrong & Ella Fitzgerald - Who Walks in When I Walk Out?
LaVern Baker - On Revival Day
Hank Ballard - Let's Go Let's Go Let's Go
Sidney Bechet - Joshua Fit the Battle of Jericho
Cab Calloway - Are You Hep to the Jive?
Nat King Cole - L-O-V-E

Sam Cooke - Movin' and Groovin'
Chris Conner - The Miser's Serenade
The Dominoes - Sixty Minute Man
Duke Ellington - Chocolate Shake
Duke Ellington - Perdido
Ella Fitzgerald - Little White Lies
Ella Fitzgerald - On the Sunny Side of the Street
Ella Fitzgerald - Sing Me A Swing Song
Ella Fitzgerald - Solid as a Rock
Five Royales - Crazy, Crazy, Crazy

Connie Francis - Stupid Cupid
Slim Gaillard - Potato Chips
Benny Goodman - This Can't Be Love
Lionel Hampton - Hey! Ba-Ba-Re-Bop
Lionel Hampton - Lavender Coffin
Etta James - Good Rockin' Daddy
Harry James - I've Heard That Song Before
Louis Jordan - Blue Light Boogie
Kansas City Band - Moten Swing
Gene Krupa & Anita O'Day - Let Me Off Uptown

Gene Krupa & Anita O'Day - Watch The Birdie
Julia Lee - The Spinach Song
Julia Lee - Tonight's the Night
Peggy Lee - Fever
Peggy Lee - Why Don't You Do Right (1942 Version)
Glenn Miller - (I've Got a Gal in) Kalamazoo
Lucky Millinder - Apollo Jump
Lucky Millinder & Sister Rosetta Tharpe - Shout Sister Shout
Roy Milton & His Solid Senders - 'Tain't Me
Jelly Roll Morton - New Orleans Bump

Elvis Presley - All Shook Up
Louis Prima - The Music Goes 'Round And Around
Louis Prima - One Mint Julep
Artie Shaw - Begin The Beguine
Nina Simone - My Baby Just Cares for Me
Frank Sinatra - Five Minutes More
Maxine Sullivan - Massachusetts
Big Joe Turner - Flip Flop and Fly
Sarah Vaughan - Hey Naughty Papa
Gordon Webster - Dark Eyes

Posted by Glen Mazza in Other at 03:00AM Mar 20, 2021 | Comments[0]

https://glenmazza.net/blog/date/20210101 Friday January 01, 2021

Blog Index

Here's a collection of blog and external links for easy reference by topic.

Salesforce Marketing Cloud:

  1. FuelSDK-Java fork available (Apr 2023)
  2. Deleting subscriber lists from Marketing Cloud (Aug 2022)
  3. Using Marketing Cloud's SOAP endpoint to manage subscriptions (Aug 2022)
  4. Activating Triggered Sends with Marketing Cloud (Sept 2022)
  5. Activating List Sends with Marketing Cloud (Nov 2022)
  6. Obtaining Marketing Cloud Sends and Opens Data (Apr 2023)
  7. Creating Clicks and Bounces extract files (Apr 2023)
  8. Obtaining user agent data for email opens from Marketing Cloud (Nov 2022)
  9. Changing the row retention period for SFMC data extensions (Apr 2023)
  10. Using Content Builder templates with Marketing Cloud sender profiles (Apr 2023)
  11. Marketing Cloud API calls to retrieve all SQL Queries and data extensions (Apr 2023)
  12. Creating an automation (shell) using Marketing Cloud API (Apr 2023)

Salesforce CRM:

  1. Creating a Salesforce Connected App (March 2021)
  2. Making Salesforce CRM API calls with Postman (March 2021)
  3. Java Client for Salesforce CRM API calls (May 2023)
  4. Using Spring Boot to process Salesforce Change Data Capture events (May 2021)
  5. Creating and Processing Enriched Change Data Capture Events (May 2021)
  6. Publishing Salesforce platform events via Apex triggers and REST controllers (July 2021)
  7. Inserting multiple Salesforce CRM records with a single API call (Nov 2022)
  8. Composite API added to Salesforce CRM Java Client (May 2023)

Programming:

  1. Creating Chrome- and Firefox-compliant local development certificates (March 2024)
  2. Using Micrometer to send custom metrics to Datadog (May 2023)
  3. Inserting multiple Salesforce CRM records with a single API call (Nov 2022)
  4. Adding a custom grant type to Spring Authorization Server (May 2023)
  5. Using MySQL testcontainers with Spring Boot and Flyway (May 2023)
  6. Java client for Domo (Feb 2024)
  7. Java client for Adobe Marketo (August 2024)
  8. Kotlin client for Splash Events (May 2024)

Other Topics:

  1. Deploying TightBlog on Linode
  2. My Ubuntu post-installation tasks
  3. Revisiting Revenue Tariffs
  4. Benefits of Retaining the Electoral College
  5. Detroit's 1826 Independence Day celebration
  6. Suggestions on handling written warnings
  7. Swing Era Newspaper Links
  8. Fifty Best Songs for Swing Dancing (aka Lindy Hop)
  9. Glen's Fitness Tips

Posted by Glen Mazza in Other at 02:00AM Jan 01, 2021 | Comments[0]

https://glenmazza.net/blog/date/20200704 Saturday July 04, 2020

Detroit's 1826 Independence Day celebration

From the Detroit Gazette, July 11, 1826, page 2:

The manner in which the 50th anniversary of the Nation's Independence was celebrated in this city reflects the highest honor upon the patriotism of its citizens.

The dawn of the Jubilee was welcomed by the national salute of 24 guns. At about ten o'clock the citizens repaired to the Protestant Church, where proper religious exercises were perfomed and a sermon, replete with excellent and appropriate sentiments, was delivered by the Rev. Mr. Wells, from the 17th Psalm--"Praise ye the Lord, all ye nations: praise him, all ye people. For his merciful kindness is great towards us: and the truth of the Lord endureth forever. Praise ye the Lord."

After the exercises at the Church were terminated, the citizens repaired to the Council House, were a procession was formed, agreeably to the order of the day heretofore published. Many of the officers of the militia were in handsome uniforms--Capt. Cook's company of dragoons were also in their appropriate dress; and added much to the appearance of the procession. Among those who took their place in the procession, were the Hon. JOHN TRUMBULL, known throught the Union for his learning, and for his patriotic writings during our revolutionary struggle--and the Hon. JAMES WITHERELL, Maj. THOMPSON MAXWELL, and Col. STEPHEN MACK, all veteran "continentals." The appearance of the Detroit Mechanic Society, each member of which wore an appropriate badge upon his left breast, was creditable to the association.

The procession having been formed, it proceeded, accompanied with martial music, down Randolph Street to Woodbridge Street and down the latter to Woodward Avenue--it then proceeded to the Presbyterian Church, which was soon filled to overflowing. The exercises in the Church were conformable to the arrangements published last week. The Throne of Grace was first addressed by the Rev. Mr. Wells, who, though fatigued with the exertions of the morning, and in ill health, effectually directed the thoughts of his audience to that Great Source, from whence flows all our blessings and privileges as a nation. The Declaration of Independence was read by Col. H.J. Hunt, who introduced it by some brief and truly appropriate and patriotic remarks. It was not read for the purpose of exciting hatred, or keeping alive animosities, which were created by the most overbearing and despotic measures of a powerful government, against a weak yet brave people, who had endured almost every suffering in the catalogue of human misery, to obtain a comparative liberty--but it was annually referred to, as the best compendium of those wrongs which authorized and urged our fathers to hold the people of Great Britain as they held the rest of the world, "enemies in war, in peace friends."

The Oration was read by A.G. Whitney, Esq. It was from the pen of the venerable author of "M'Fingal", and was such as might be expected from a writer, who in "the times that tried men's souls," was held in as great dread by the Tories and enemies of our independence, as were Morgan's rifle-men, or the Virginia dragoons.

After the reading of the oration, the Rev. William Simmons addressed the Throne of Grace, and the exercises closed with an Anthem. Appropriate Psalms had been selected for the occasion, and they were sung, by the choir, under the direction of Mr. E. P. Hastings, with correctness and taste.

The committee of arrangements deserve praise for the elegant manner in which the church was decorated.

After leaving the church the procession was again formed, and proceeded to the Hotel of Capt. Woodworth, who had prepared a bountiful dinner, in the large new store-house of Mr. A. Berthelet. At three o'clock, those citizens who wished to partake of the dinner, together with the Mechanics' Society, the whole amounting to nearly two hundred, moved in procession to the store house and took their seats at the table--John P. Sheldon presiding, assisted by Col. H.J. Hunt, as vice-president.

Posted by Glen Mazza in Other at 03:00AM Jul 04, 2020 | Comments[0]

https://glenmazza.net/blog/date/20200622 Monday June 22, 2020

Revisiting Revenue Tariffs

Summary: This article encourages usage of the revenue tariff as the first source for funding the U.S. federal government, calibrated at a rate to maximize the cash flow into the federal treasury. These funds should be used to exempt corporate taxation and other fees on U.S.-based manufacturing, allowing them to produce items at a lower, more competitively priced cost. More domestic employment and reduced cash transfers overseas will result in cost savings for the government that grow over time. Apply those savings in turn towards having ever-higher minimum income thresholds before the personal income tax comes into effect.

Revenue tariffs--a method of funding the government's responsibilities by means of a tax we place on ourselves when we buy a new foreign-made product--play just a minor role in the federal budget today. In 2018 they provided only about $41 billion or 1.25% out of a $3.3 trillion budget, with personal and corporate taxes providing about 57% (the payroll tax for Social Security and Medicare making up the bulk of the remainder). However, with the exception of an income tax for a twelve year period during the Civil War and Reconstruction, providing about 20% of the nation's income, we did not have an income tax until the passing of the 16th Amendment in 1913 which allowed the federal government to collect tax not proportional to a state's population. The 1960 Treasury Report (four pages in question, compare customs vs. total receipts) show revenue tariffs supplying 80-90% of government needs up to the Civil War, and about 60% through the second half of the 19th century and first decade of the 20th. Income taxes first overtook revenue tariffs in 1917 ($360 million to $226 million), and in the following year blew past them for funding World War I ($2.3 billion vs. $180 million). In the 1920's tariffs bounced back a bit, providing about 10-20% of government revenue, before decreasing in importance again. Since the end of World War II tariffs have been providing the 1-2% that they deliver to this day.

In discussing tariffs, it is necessary to distinguish revenue tariffs--the subject of this article--from protective (or prohibitive) tariffs, as they differ in their manner in which they boost domestic manufacturing and are at opposite ends of whether the purchase of foreign-made products should play a role in funding of government. Most journalists supporting tariff-free access for foreign-made products to the United States (i.e., free trade) use "tariffs" in the easier-to-rebut protective sense, causing revenue tariffs to miss proper consideration.

  • The revenue tariff is a tax placed on new foreign-made products that is intended to fill government coffers allowing taxes to be reduced elsewhere in a targeted manner. For the case of a $120 Chinese-made computer monitor that presently could not be made for less than $400 in the United States, for example, a 20% revenue tariff places $24 in the federal treasury, making the item $144 for consumers. It still does not cause one to buy the $400 U.S.-made monitor, however the tariff money raised allows for removing taxation on U.S. manufacturers of all products, dropping their prices and hence expanding the fields of other U.S. products which can now be competitively priced. For the case of a foreign-made item selling for $10 and a U.S.-made one that can be produced for $13, a 20% tariff raises the price of the former to $12 and removed corporate taxes and other revenue-generating fees from the latter may drop its price to $11, enabling that product to be domestically made.

  • Protective tariffs are not intended to provide revenue for the U.S. treasury but are instead meant to compel purchase of the American-made product. For the case of the $120 Chinese vs $400 US computer monitor, we place a 300% tariff on the former, making it $480, so the American monitor gets bought instead and no tariff revenue sent to the federal treasury. Without this additional source of government revenue, America's tax reliance on personal and corporate income taxes remains largely the same, although probably reduced somewhat due to higher employment creating more taxpayers. Protective tariffs form a direct way of forcing people to buy domestic even where it's not cost-effective, dropping standard of living in the process. Although American manufacturers would still need to compete against themselves, providing such competition exists, there would be reduced incentive to compete well against foreign manufacturers as they can always rely on a protective tariff to make the foreign product more expensive.

It is perhaps instructive to note that free traders and supporters of protective tariffs find themselves in agreement on the inappropriateness of government using the sale of foreign-made products to fund its responsibilities, but for different reasons, the former because that would mean the tariff rate is nonzero, the latter because that would mean the tariff rate wasn't sufficiently high enough to compel the purchase of the American product. Free traders and supporters of revenue tariffs on the other hand differ on whose manufacturing--domestic or foreign--they want to see taxed. With the former, corporate taxes on domestic manufacturing and income taxes are to be used however much is necessary to avoid needing to obtain revenue from foreign products, keeping the latter at the lowest possible price. Their position seems analogous to arguing that foreign-made products should be exempt from state sales taxes, as that would form an unacceptable "barrier to trade", with the sales tax doubled on American-made products to make up for the lost revenue, and when American products get sold less as a consequence, to raise the sales tax on those dwindling American-made products even higher to make up for that lost revenue, a snowballing effect pushing most all production overseas.

Supporters of revenue tariffs are not hostile to foreign-made products, as per this system imports are needed to pay the taxes. Due to wide divergences in labor costs and employee regulations many products will continue to be made overseas. It is not acceptable, however, for foreign-made products to gain an edge because the U.S. government, in exempting taxation on foreign-made products, had to place taxes on domestic-made ones to make up the lost revenue, unnecessarily inflating the latter's price and causing domestic unemployment. Free trade, the increasing of the price of domestic products via taxation in order to drop the price of foreign-made products by keeping them tariff-free, is really reverse protectionism of foreign products over American-made ones.

What makes revenue tariffs such an efficient form of taxation, and why government should therefore always look at them as the first source of funding, is that they not only provide income for the government but play an unparalleled role in reducing the need for government outgo, the latter of which income taxes simply don't provide. When we're not buying $450 billion a year from China, our military doesn't need to spend as much to defend against her (or North Korea for that matter), saving money and creating more peace of mind. With greater meaningful employment in domestic manufacturing, social costs (welfare, crime/prisons, drug addictions, etc.) are also reduced. While mitigating the economic ills of free trade provides lots of jobs for government workers--perhaps making many of them and their private-sector contractors among the bigger supporters of free trade--these public sector positions require high taxation and mounting debt to support. Further, with manufacturing providing more decent non-college-degree requiring job opportunities, there would be a reduction in people seeking university degrees in an attempt to avoid the main alternative of lower-level service-sector jobs, degrees that often provide little more but a return to the same service-sector jobs but with the additional burden of four lost years and sizeable college loan debt.

Support for the revenue tariff is based on the belief that paying one dollar in revenue tariffs will save several dollars in income taxes over time and the belief that the society brought about by revenue tariffs is much better than one based primarily on income taxes. With the latter, one is usually just fixing the problems of an underperforming society due to lack of meaningful employment and heavy cash transfers to our Chinese adversary. With the revenue tariff, we're instead directing our taxes towards fellow Americans having meaningful work in the private sector and taking advantage, at income tax time, of the societal benefits that result.

An eloquent defense of tariffs can be found in Abraham Lincoln's Circular from the Whig Committee of 1843, in which he compares tariffs vs. direct (property) taxes: The tariff is the cheaper system, because the duties, being collected in large parcels at a few commercial points, will require comparatively few officers in their collection; while by the direct-tax system the land must be literally covered with assessors and collectors, going forth like swarms of Egyptian locusts, devouring every blade of grass and other green thing. And, again, by the tariff system the whole revenue is paid by the consumers of foreign goods, and those chiefly the luxuries, and not the necessaries, of life. By this system the man who contents himself to live upon the products of his own country pays nothing at all. And surely that country is extensive enough, and its products abundant and varied enough, to answer all the real wants of its people. In short, by this system the burden of revenue falls almost entirely on the wealthy and luxurious few, while the substantial and laboring many who live at home, and upon home products, go entirely free. By the direct-tax system none can escape. However strictly the citizen may exclude from his premises all foreign luxuries,—fine cloths, fine silks, rich wines, golden chains, and diamond rings,—still, for the possession of his house, his barn, and his homespun, he is to be perpetually haunted and harassed by the tax-gatherer.

Another special characteristic of revenue tariffs is that it is no longer necessary to be concerned about buying made-in-America products. Either you're buying American (great!), or you're flushing money into the U.S. treasury, providing the financing to keep domestic manufacturing cheaper, with other U.S. products being more easily sold to others as a consequence. It's win-win. This is a considerable improvement over the status quo which punishes caring for your fellow Americans, where those doing the right thing by buying American end up paying more in taxes (both directly via sales tax on higher priced U.S. products and indirectly built into the product by the taxes the American manufacturers and their workers pay) than those buying tariff-free foreign goods.

An tariff rate for initial consideration might be 20% world-wide with the exception of China which would have a 30% tariff. Why more for China? Similar to the gasoline tax meant to pay for roads -- the more gasoline one buys, the more one is driving, and hence the more of the road upkeep one should pay -- when we buy Chinese products we're strengthening their military and indirectly, North Korea's, causing us to need to spend more on defense to counteract them. Therefore we should be helping to cover those extra costs at the point of sale, so the more Chinese products each individual buys the more of the tax that individual properly pays.

One of the concerns about relying on revenue tariffs is that "other countries would retaliate!" and that American businesses would be worse off as a consequence. That would be a stronger argument with protective tariffs, but with revenue tariffs the level of blockage is less (again, we need imports to pay the taxes.) It's also based on an incorrect perception, that they haven't already been putting revenue or protective tariffs on our products all along. Much if not most free trade the U.S. has engaged in the past is of the one-way variety of them to us, seemingly the only direction that most free-trade supporting editorialists care about. As Patrick Buchanan noted, most countries use a VAT system which they exempt on products leaving their shores and place on foreign products coming in, serving effectively as a tariff that a VAT-less USA isn't counteracting.

Ultimately, we can't sell a product in foreign nations unless we're first manufacturing and selling the product here, and exempting U.S. domestic manufacturers from taxation provides the broadest nationwide benefit in allowing us to find and produce more things that, after being sellable in the USA, can next be sold world-wide. Also, as for retaliation, the $100 billion or so China buys from us, usually in agriculture, is primarily paid from the $450 billion that we buy from them, so those sales are easily made up as we spend more of our money on ourselves. Being their military competitor on Japan, Korea, and Taiwan, China has clear strategic reasons to buy as little from us as possible, making that country a poor investment for us. As for the oft-stated concern that tariffs on manufactured products would hurt the economic situation of our farmers (e.g., tariffs on Chinese products resulting in China buying less U.S.-grown soybeans), President Calvin Coolidge noted in his 1927 State of the Union address:

It is often stated that a reduction of tariff rates on industry would benefit agriculture. It would be interesting to know to what commodities it is thought this could be applied. Everything the farmer uses in farming is already on the free [i.e., untariffed] list. Nearly everything he sells is protected. It would seem to be obvious that it is better for the country to have the farmer raise food to supply the domestic manufacturer than the foreign manufacturer. In one case our country would have only the farmer; in the other it would have the farmer and the manufacturer. Assuming that Europe would have more money if it sold us larger amounts of merchandise, it is not certain it would consume more food, or, if it did, that its purchases would be made in this country. Undoubtedly it would resort to the cheapest market, which is by no means ours. The largest and best and most profitable market for the farmer in the world is our own domestic market. Any great increase in manufactured imports means the closing of our own plants. Nothing would be worse for agriculture.

Finally, even if it may be considered retaliation, it should be noted that the revenue tariff system is a legitimate tool for all nations to expand their wealth, particularly those not relying on a VAT, ensuring the products that can be made domestically are done so instead of relying on environmentally wasteful cross-oceanic shipping. In so doing, revenue tariffs provide another effective way of encouraging "Buy Local."

Posted by Glen Mazza in Other at 02:00AM Jun 22, 2020 | Comments[0]

https://glenmazza.net/blog/date/20200504 Monday May 04, 2020

Swing Era Newspaper Links

Swing Era-related links from Google Newspaper Archive:

Posted by Glen Mazza in Other at 03:00AM May 04, 2020 | Comments[0]

https://glenmazza.net/blog/date/20161120 Sunday November 20, 2016

Benefits of Retaining the Electoral College
  1. It respects the Great Compromise between the states - The Great Compromise, meant to protect small states from getting overwhelmed by the larger ones, necessary to get them to agree to form the Union, extended not just to the legislative branch but the executive as well. By adding the equal number of senators to the number of congressmen to determine each state's electoral votes, small states were given additional weighting in the say they would have in choosing the President.

    For example, one state A with twice as much population as B might have 6 representatives to B's 3. However, the number of electoral votes is not 6 to 3 or twice as much say but 8 to 5 due to the addition of the senators, resulting in just 1.6 times as much say, honoring the compromise. Switching to a popular vote would eliminate that weighing benefit, as state A would have roughly twice as many voters as B and hence twice as much say.

    This benefit given to the small states has shrunk by about a third since the country was formed. In the First Congress there were 68 congressmen and 26 senators generating a total of 94 electoral votes, so that a state's population was only a 68/94 = 72.3% factor of its say. Since the number of congressmen was fixed at 435, population now provides 435 / 535 (leaving out D.C.'s 3 electoral votes which aren't based on representation) or 81.3% of the weighting.

  2. States are better protected from voter irregularities occurring in other states - With the Electoral College, any ballot-box stuffing done by one state does not limit the say of others. Take one state with say 10 electoral votes, for example, they could have three, five, ten million falsified ballots for a candidate, they can go to town, it wouldn't matter, only that state's 10 electoral votes would be corrupted. Pennsylvania (20 votes), Iowa (6), Arizona (11), etc., would still have their say and their respective weighting. If we switched to a popular vote, those invalid votes would count to the national total, harming the say of states that run their elections more cleanly. In general:

    • With a national vote election, states which do a better job ensuring valid voting (photo ID, checking to make sure voter registrants are US citizens, alive, etc.) would lose say over states that tend to look the other way in such matters.

    • Conversely, because we use an Electoral College, there is much less incentive for ballot-box stuffing as it doesn't buy one party-dominant states tempted to engage in such activities anything. It results in cleaner elections, and hence a cleaner society, nationwide.

    • A national vote would encourage a race to the bottom in granting suffrage ("State A is now allowing their green card holders to vote, so we should also lest we lose our say...", "State B is now allowing 16 year olds to vote...", etc.)

  3. Close elections are much easier to resolve - The 2000 election between Bush and Gore took about one month to resolve but the focus thankfully was just with Florida and its then-25 electoral votes. Because the Electoral College was all that mattered, the other 49 states could be ignored, 20 inaccurate votes in Idaho for example or 30 missed votes in California could be disregarded. However, if we had a tightly close popular vote election, then every precinct in every county in every state would be subject to re-examination, to grab 5 votes here and 10 votes there because they all count towards the national vote total, not a situation anyone would relish.

  4. With the Electoral College, people are more likely to vote for a candidate based on his/her policies rather than on whether or not he/she has visited their state. - Voters in places like California and Tennessee where the outcome of the vote is not in doubt are perfectly fine with their candidate of choice never visiting their home state during the campaign. More than that, they don't actually want their candidate wasting time in their home states, instead wanting him or her to be in battleground states trying to win them over so their candidate can win. This provides a lot of relief to presidential candidates as it allows them to focus on visiting just 10-15 battleground states, a grueling enough task as it is.

    With a national popular vote, however, it would still make sense to visit vote-rich states regardless of their leanings, causing many voters to get offended if their candidate does not visit them, and possibly switch votes as a result. So the Electoral College is more likely to result in voters casting votes based on the candidate's policies than whether they visited their state, good for the nation as a whole.

  5. The Electoral College makes election night a lot more exciting to watch - A silly argument, but still true. With the Electoral College, viewers see a scoreboard of states that slowly get lit up in red and blue during the evening, for which viewers can celebrate or mourn each time a candidate wins or loses a state. With a national vote you're just waiting for a vote total at the very end, rather dull for all concerned. It would be similar to watching a football game in which all touchdowns and field goals are irrelevant but just the total yards gained within the 60 minutes of play determining the victor.

Finally, it should always be noted that a candidate who wins the popular vote and loses the electoral votes on an election based on the latter wouldn't necessarily have won the popular vote if it were based on the former, as the campaigning done--states visited, TV advertising strategy, issues chosen, voter turnout generated, etc.--is different under the two styles. A skilled candidate who can win with one set of rules quite frequently has the ability to win under another.

Posted by Glen Mazza in Other at 02:00AM Nov 20, 2016 | Comments[0]

https://glenmazza.net/blog/date/20130317 Sunday March 17, 2013

Glen's Fitness Tips

Some exercise and diet lessons I've learned over time:

Exercise:

  1. Switch from per-day to per-week discipline. For many years I tried to exercise a set amount each day or every other day but would find my discipline would soon wane for one reason or another, causing difficulty restarting and getting back into a groove. About six years ago I switched to per-week discipline, which I've been able to adhere to 100% since then, amazing considering all the problems I was having before.

    With per-week discipline I give myself a weekly quota of exercises to do, starting Friday and ending on Thursday at midnight. If I finish up the week's quota by, say, Monday, I'll have nothing more to do through Thursday. But I frequently exercise in advance for the following week's quota if I finish early; indeed for the past several months I've usually been about two weeks ahead of schedule.

    Weekly discipline takes into account that some days we are unable or simply don't feel like exercising, some days we're in a groove and can do multiple days' worth of exercising, etc. Giving seven days to make the quota makes it much easier to stay on track without the energy-wasting falling-off-and-resetting of exercise plans that frequently occur when daily discipline is tried. It has one drawback in that it's better to spread out exercise over the week instead of clumping up too much on certain days, but over time I've found my exercise days to be spread out rather evenly.

    Recommended quotas? Do what works for you of course, but my weekly quota is 5 hours 15 minutes of exercise, which comes out to 45 minutes per day. For me, the quota can be met aerobically (jogging, ice skating, elliptical machines, or swing dancing credited at 3 minutes per song) or via lifting weights. For the latter, I count 36 sets of whatever exercises (normally split out as six sets of six different exercises), however long it takes me to do so, as good for 45 minutes against my quota, which comes out to 1 minute 15 seconds per set. For five specific particularly good but time-consuming exercises, I let just 30 sets of those count for meeting my quota, which incentivizes me to do the best exercises.

  2. Use the Internet and social interaction to get more out of physical exercise. For weightlifting, there's bodybuilding.com and countless weightlifting videos on YouTube to learn proper technique for specific exercises (and for some, especially those potentially involving the lower back, it's very important to have the technique right). It is good to make one's before- or after-work friends those in the gym, as it provides another incentive to exercise (similar to those who go to the same bar after work specifically to meet the friends they've made there.) For aerobic exercise, meetup.com offers running, hiking, and walking groups for most areas. The running group whose events I frequently take part in has attendees walk/jog/run say 20 minutes out and 20 minutes back, so everybody returns at roughly the same time regardless of individual running pace.

  3. For those new to exercise routines, two suggestions:

    • For heavy TV watchers/'Net surfers who have trouble motivating themselves to exercise, making the watching of TV or internet access for the day contingent on walking/jogging, etc., 30 or so minutes, is one way to help ensure getting one's exercise quota, and getting it in very early. It's frequently easier to discipline oneself to not do something enjoyable until the exercises are finished than to discipline oneself to do the exercise without there being any immediate reward afterwards.

    • Don't buy indoor exercise machines until you first learn to enjoy outdoor exercise (providing that is an option for you). It's dispiriting for anyone to buy a machine with the best of intentions and then see it sit unused as an ugly reminder of not getting exercise in. I would suspect the greatest amount of machine purchase failures (i.e., buy the machine but it sits unused) appear to be among those who assume that outdoor exercise is unpleasant but think it will be more palatable if they buy an indoor machine that looks neat and allows them to watch TV while exercising. Problem is, exercising indoors on a machine while trying to watch TV, for many regular exercisers, is actually lousy compared to outdoor exercise. But if you haven't done much regular outside walking/jogging first, you might incorrectly assume that the unpleasantness of indoor exercise means that outdoor exercise must therefore be much worse, when in fact the opposite is true.

      Further, buying a machine in order to make exercise more palatable perpetuates a fallacy that it is best to tackle early on for those wanting to get in better shape: namely, the idea that the world will end if a person has to do something unpleasant (like outdoor exercise), and that every waking minute must be spent doing pleasant things. Indeed doing outdoor exercise specifically because it is presumed less pleasant helps to toughen one up, to see that one can do unpleasant things on a regular basis and survive the experience.

Diet:

  1. Drink water instead of sodas (even diet sodas). Despite their lack of calories, in my observation diet sodas seem to encourage more eating (compared to water) in order to neutralize their roughness on the stomach, also they form part of combo meals at fast food restaurants, encouraging purchases of unhealthy foods in the process. They also consist of a bunch of chemicals and additives the body doesn't need. And if you use filtered water pitchers such as those by Brita and Pur, a lot of landfill waste (empty bottles and cans) can be prevented.

  2. Practice food divorce. It's easier to give up 100% on a bad food item, now and forevermore, than to try to cut down 80% on that food item, because with 100% abstinence after a while you forget what the food item tastes like, and with that, lose your temptation to eat it. As Reverend Sharpton noted: "Once you give things like starches and fried foods up, you find you won't be tempted by them any more. You forget them." He probably would not have had his success had he merely cut down on such food items, because by being constantly reminded of how yummy they are are the willpower necessary to lose weight would have been insurmountable.

    Food divorce is probably best done one fattening food item (or class of items) at a time while keeping the rest of your diet the same. Go several months or however long until you've well forgotten what the food item tastes like, then choose another bad food item to say sayonara to.

    My food divorce started in May 2011, when I first gave up all diet sodas in favor of water. It was tough for awhile--until I reached that happy state where I largely forgot what they tasted like. And today I love ice cold filtered water. In May 2012 I gave up pizza, as I would always overeat it. About a month later I made a huge jump and gave up all processed sugars--cookies, ice cream, pies/cakes, sugar in coffee--whatever, except for the incidental amounts in bread, milk, etc., and from fruits and vegetables. It was tough for a couple of months, but I made it: Today I can look at a brownie and have little desire to eat one because I've largely forgotten what they taste like, it's not even a willpower issue any more. Indeed, my food routine is so old-hat today I don't even think of myself as being on a diet.

    Around October of last year I stopped eating out, except when I'm travelling. This is forced me to become more of a cook at home, and has saved me time, money, and excess calories, as well as resulting in me eating healthier food.

    Because I've given up processed sugars, I haven't bothered restricting other types of carbs such as rice or bread, etc. My total caloric intake is probably just moderately reduced, I still eat fully except none of the aforementioned food items.

  3. For those with willpower problems, deliberately eat some plain and unpleasant food items daily. Plain foods without the salt, sugar or other seasoning that you would normally add, for example, coffee without cream or any sweetener additives, a plain baked potato or plain toast without butter. Doing so helps to toughen one up, to learn the world won't end if not every food item consumed is fantastically delicious, a mindset necessary to defeat in trying to improve one's diet. For years I thought pure black coffee with no sweetener would be impossible for me to consume, but that's the only way I drink it now. I drink much less of it as a result, but I still consume it--who cares if it isn't the most delicious thing in the world? I don't need that, I'll survive.

  4. Don't weigh yourself. On a day-by-day basis, scales are an inaccurate measure of health and also even of weight (because weight will also vary by the clothes being worn, the amount of water and undigested food in the body, etc.) They also encourage crash-dieting and penalize weight-lifting (as weight retained may be due to gained muscle), harmful for overall health and appearance. Basically, you either look good or you don't, and the number on the scale doesn't play much of a factor in that. There are healthier long-term ways to see progress being made--looking slimmer, people noticing weight loss, clothes feeling looser, etc. In my view, dispensing with the scale forces a person to make long-term efforts to see the progress they're craving instead of allowing that craving to be met just by seeing lower numbers on the scale. In the past year, I've weighed myself very few times (and not once so far in 2013)--during my annual physical and at the gym scale right after to confirm that I had indeed lost several pounds.

Posted by Glen Mazza in Other at 03:00AM Mar 17, 2013 | Comments[0]

https://glenmazza.net/blog/date/20121007 Sunday October 07, 2012

My Ubuntu post-installation tasks

Updated December 2015.

The below lists my post-installation tasks for Ubuntu Linux. Once or twice a year I find myself needing to re-install Ubuntu, so I find maintaining a checklist that I update each time helps me go through the process more quickly. I've found that by keeping a new hard drive separated into three or four partitions (operating system, swap space, applications and data either together or split) --I can minimize the effect of an OS reinstallation, namely that just the OS partition needs to be wiped clean and reinstalled and my other two partitions will be usable as before. (Separating the application and data partitions has the additional benefit in that one may only need to back up the data partition.) Some files in the operating system partition, however, need to be re-configured after a re-install so the application partition can be working again, and I've made notes below where I've found that occurring.

I've found it too clumsy and hard to maintain a dual-boot (Windows and Ubuntu) hard drive, so I keep each on a separate SSD hard drive and swap out Ubuntu for the relatively infrequent times I need Windows. In turn, either SSD drive can be swapped between my faster desktop and slower laptop, so I can work from the former at home and switch to the latter when travelling.

The below files I keep on the data partition in a restoreFiles separate folder, to be re-inserted into the OS partition after an OS reinstall:

  • My .ssh key for GitHub
  • My PGP key for Apache
  • An export of my Thunderbird email filters, created by the Message Filter import/export plugin
  • .sh utility scripts to I use to run applications
  • Konversation IRC configuration files (konversationrc and konversation.notifyrc) located in ~/.kde/share/config.
  • Personal HTML home page containing frequently used links
  • Maven settings.xml file
  • .gitignore_global file and .subversion folder, located in the home folder
  • Within Tomcat, the JDBC drivers, the JavaMail JAR, and TightBlog and JSPWiki properties files in the lib folder and the Tomcat server.xml file.

Post-Ubuntu install Configuration Steps:

  1. Update Ubuntu with the latest from the 'Net: sudo apt-get update && sudo apt-get upgrade or via Software Updater.
  2. Install Skype, make sure it works using the Skype Echo/Sound Test Service
  3. Install HP LaserJet drivers
  4. Using Ubuntu Disks application, check mount point locations of the partitions created:
    • Not at desired mount point location (/work for me)? See here.
    • Not automatically mounted at startup? (check on subsequent boots) See here.
    • Check ownership of non-OS partition: ls -la from / folder, if root:root, change to login account (sudo chown -r gmazza:gmazza work).
  5. Configure Thunderbird:
    1. Add your mail account(s), and once done, pick desired default SMTP server.
    2. If you have mail filters, install the Message Filter Import/Export add-on. Import the previous message filters file and confirm the filters route to the correct mail folders.
    3. If you've saved your local mail files in a non-default location, right-click on Local folders, Settings, and change the directory to that location.
    4. If needed, create the signature lines for your email accounts.
  6. Files from the list at the top that need copying to home folder:
    • .ssh folder
    • .gnupg folder
    • .bashrc folder
    • .subversion folder
    • .gitignore_global file
    • Any custom .sh files used to start applications
  7. Applications that need re-installing:
    • sudo apt-get install git
    • sudo apt-get install subversion
    • sudo apt-get install dolphin
    • sudo apt-get install konversation
    • Reconfigure Konversation IRC client: Start konversation to create the ~/.kde/share/config folder automatically, then move konversationrc and konversation.notifyrc files to that folder
    • Install Google Chrome
  8. Set Firefox, Google Chrome to default home page.
  9. Install GitHub-Dark theme from userstyles.org.
  10. gedit changes:
    1. On the Edit->Preferences page, Disable gedit's backup copy option
    2. and set the tab width to 4 spaces, inserting spaces for tabs.
    3. Configure gedit to work well with Dolphin
  11. Create a Terminal profile (File->New Profile) named "HasTitle", based on the default profile. On Title and Command page, "When terminal commands set their own titles" item, set to "Keep initial title". This allows scripts which open multiple terminal tabs to have their tab titles kept.
  12. Switch Dolphin to details view (Menu item View -> Adjust View Properties), and have it always use gedit to open text files (in Dolphin, right-click a text file, "Open With...Other", and then select to always use Gedit.)

Development Application installation:

  1. Install Oracle JDK along with unlimited encryption
  2. Java plugin for Firefox: follow here and here to simlink to the Java version you downloaded, and test via this link.
  3. Install Tomcat (and configure tomcat-users.xml file)-- test it will start with tomcat.sh script. Move the TightBlog-specific configuration files over.
  4. Install Maven, replace the $MAVEN_HOME/conf/settings.xml with that from the restoreFiles directory.
  5. Install IntelliJ IDEA
  6. Install Derby
  7. Install SquirrelSQL (need to run java -jar), and in its lib folder add any desired JDBC JARs.
  8. Update the ~/.bashrc file to include paths to the above applications and other desired configuration. Then run source ~/.bashrc for the new values to take effect for the current terminal window. The below is what I add to the end of the default .bashrc file:
    export JAVA_HOME=~/work/jdk1.8.0_65
    export CATALINA_HOME=~/work/apache-tomcat-8.0.30
    export MAVEN_HOME=~/work/apache-maven-3.3.9
    export DERBY_HOME=~/work/db-derby-10.12.1.1-bin
    export SQUIRREL_HOME=~/work/squirrel-sql-3.7
    export IDEA_HOME=~/work/idea-IC-143.1184.17
    export PATH=$PATH:$JAVA_HOME/bin:$MAVEN_HOME/bin:$DERBY_HOME/bin:$SQUIRREL_HOME:$IDEA_HOME/bin
    
    export JAVA_OPTS="-Xmx2048M"
    export MAVEN_OPTS=$JAVA_OPTS
    export CATALINA_OPTS=" -Xdebug -Xrunjdwp:transport=dt_socket,address=5005,server=y,suspend=n"
    
    # add common exclude filters to grep
    alias grep='grep --color=auto --exclude-dir={.svn,target,.idea} --exclude='*.iml''
    # for grep, switch from hard-to-read magenta to bright yellow (use fn=33 for dull yellow)
    # see: http://en.wikipedia.org/wiki/ANSI_escape_code#Colors
    export GREP_COLORS="ms=01;31:mc=01;31:sl=:cx=:fn=01;33:ln=32:bn=32:se=36"
    
    # (MacOS only) Show current git branch at command-line
    if [ -f $(brew --prefix)/etc/bash_completion ]; then
      . $(brew --prefix)/etc/bash_completion
    fi
    
    export GIT_PS1_SHOWDIRTYSTATE=1
    export PS1='\[\033[01;32m\]\u@\h\[\033[01;34m\]\w\[\033[01;33m\]$(__git_ps1)\[\033[01;34m\] \$\[\033[00m\] '

Source code download (need write access for these URLs):

  1. Apache CXF: svn co https://svn.apache.org/repos/asf/cxf/trunk cxf
  2. Tightblog: git clone git@github.com:gmazza/tightblog.git
  3. Jersey samples converted to CXF: git clone git@github.com:gmazza/jersey-samples-on-cxf.git
  4. Blog samples: git clone git@github.com:gmazza/blog-samples.git

Posted by Glen Mazza in Other at 03:00AM Oct 07, 2012 | Comments[0]


Calendar
« October 2024
Sun Mon Tue Wed Thu Fri Sat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
Today
About Me
Java Software Engineer
TightBlog project maintainer
Arlington, Virginia USA
glen.mazza at pm dot me
GitHub profile for Glen Mazza at Stack Overflow, Q&A for professional and enthusiast programmers
Blog Search


Blog article index
Navigation
About Blog
Blog software: TightBlog 4.0.0
Application Server: Tomcat
Database: MySQL
Hosted on: Linode
SSL Certificate: Let's Encrypt
Installation Instructions