The Artistic Way of Programming

12 years back, when I started my formal classes in computer science, the first thing I learnt was “data” means “information”. A few days after that, we started conventional programming, where code and data were treated separately. For example, only data can be passed as the functional arguments. It was difficult for me to digest that “code, which is also information, is not treated as data”. I strongly felt that this will increase complexity of softwares in the long run.

A system does three things – read, transform (processing data), write. In other words – the mathematics (the transform part), and the effect of that in real life (the read/write part). The data transformation is indeed a mathematical concept, and with the help of read and write we make the mathematics (the transform part) useful to the real world. Bringing the “transform” part fully inside mathematical domain has its own benefit of using mathematics without fear (possible errors) for the analysis of the system, making the system more tractable mathematically. The catch is to treat both the elements of transformations, data and functions, equally.

Initially, code used to be bigger than the data, so sending data over the wire was feasible. But with time, data becoming huge, sending code to systems over the wire becomes the need, resting the data on the systems intact. With big data, the need of the hour is to treat the code as data, so that the code can be taken as argument to another meta function on a system having huge data which expects an algorithm for transformations.

Roughly speaking, codes are algorithms, algorithms are mathematical functions, functions are in turn actually look-up tables, i.e. data. Hence with this principle, all codes or functions are data.This is exactly the cornerstone of the functional paradigm. The functional programming is programming with functions, they treat functions and data likewise. Another principle I love, to control complexity, rules should not be complex itself.

Thumb rules rewritten for the functional paradigm:

Read-write and transformations(algorithms) should be separate.
Use immutable variables. Discourage use of reassignment statements.
Discourage side-effects (input/output or changing any variable in-place), every function should ONLY return its expected result.
Use referentially transparent functions (sometimes it is called pure functions) with no side effects, i.e. if x = y, f(x) and f(y) should be same forever.
Unit testing is a must for each function.
One of the main design patterns should be followed is to use expressions instead of instructions, i.e. it should be declarative in nature. Discourage use of loops like for/while – use recursive statements as shown above to calculate sum. Tell computers what needs to be done, not how to do it – it reduces error, especially edge cases.
With the need to control the complexity of the system and the advance design, the design pattern for the functional composition can be made to follow some basic algebraic structures, which in turn becomes more robust.

Posted in Uncategorized | Comments Off on The Artistic Way of Programming

Tips for Developing Astute Investing Skills

Learn to discern conflicting analyses, reports, and data as you research investing opportunities

As an investor, you must make decisions based on your study, research, and personal opinions and beliefs. You should not depend solely on the research and opinions of others. There is much good advice and information available to you.

However, there’s also a lot of differing information that you must cut through to make informed investing decisions. Here’s what you can start doing now:

Understand decisions made by entities independent of publicly traded companies

General Electric (NYSE:GE), through its Power & Water division, GE Hitachi, offers advanced and sophisticated technology for the nuclear energy industry. The GE Hitachi nuclear alliance unites GE’s design expertise and history supplying reactors, fuels, and services worldwide with Hitachi’s proven experience in advanced modular construction. This is all well and good.

Nonetheless, previously, the Canadian Press noted that, “A Federal Court ruling has thrown out the preliminary approvals for a series of new nuclear power reactors in Ontario.” Therefore, this is a case of weighing company initiatives against the landscape and mindset of the jurisdiction in which they operate, or may wish to operate with new projects. You must be aware of this when you invest.Understand the difference between company outlooks and what’s going on in the marketplace

Cameco (TSX:CCO) (NYSE:CCJ), regarding its long-term prospects was very positive about its outlook and the outlook for the uranium industry in general. The company did say in its 2013 annual report that any development or expansion of its remaining projects would depend on how market conditions develop. Cameco’s intention is to build up Cigar Lake and to expand the McArthur River/Key Lake operation.

Commercial production commenced in May 2015 at Cigar Lake with a total of 11.3 million pounds (100% basis) produced by the end of the year. The expectation is that the build up to licensed capacity of 18 million pounds per year will be in 2017.

What’s’ happening in the marketplace? In 2014, Mining.com reported that poor markets caused Cameco to put its Millennium uranium mine on hold. The highly prospective Millennium deposit is on the shores of Slush Lake in Saskatchewan. Cameco had asked the Canadian Nuclear Safety Commission (CNSC) to postpone a hearing scheduled in June 2014 into a licence application for the Millennium Mine project. The estimation is that this project has in excess of 50 million pounds of uranium.

Consider company strategies and the new economy

Sears Canada (TSX:SCC) Sears Holdings (NASDAQ:SHLD) never seemed to transform its operations as other retailers. Sears Canada dispensed some of its best stores and raised hundreds of millions of dollars in the process. Sears Canada was a mainstay in Canadian downtowns and major shopping malls.

The Company’s Toronto Eaton Centre flagship store became a Nordstrom (NYSE:JWN) store. Sears Canada has seen its target consumers taken away by bulk stores and higher-end retailers, not competing with them effectively.

Consider government reports

These are reports prepared by any level of government: federal, provincial/state, or regional or municipal. Oftentimes, federal government pronouncements paint a rosier picture than what is really happening in the economy. This is especially true at election time. You must look at what other government agencies are saying, not just the political figureheads of parties. Consider what U.S Federal Reserve Chairman Janet Yellen said in the past. She told the Joint Economic Committee of Congress that under present policies, the federal government’s deficits, “will rise to unsustainable levels.”

As an investor, you must consider what that will do to the U.S economy, the business environment, and businesses. By extension, what will this do in the coming years to Canada’s? When the U.S. rolls over, it typically nudges Canada who’s napping on its shoulder.

Due diligence means more than just studying the latest quarterly results of companies. It means studying and discerning between different government, economic, as well as marketplace reports that often are contradictory. It’s your responsibility to discern between the wheat and the chaff. If this means taking longer to make an investment decision, so be it. In the end, you will make a better investment decision.

Posted in Uncategorized | Comments Off on Tips for Developing Astute Investing Skills

5 New Year’s Resolutions for Busy Families

It somehow seems that modern life is busier than it has ever been. As well as our work and family commitments, there are now so many ways to spend our leisure time; it often feels like 24 hours is simply not long enough to get everything you wanted done in the day.

The problem of being busy all of the time (even though it is a good problem to have) hits those of us who have time-consuming jobs and are also raising a family the hardest. If you fall into this category, you may find it helpful to read the following list of five potential New Year’s resolutions you could make to ensure your 2017 is less stressful than this year may have been!

1) Leave the office on time – Even if it’s only on one or two days a week, it is important that you sometimes put your foot down and leave your place of work as soon as your day is meant to finish. You’ll find that you get much more done in the evenings!

2) Invest in a 2017 calendar – It may sound like a simple step, but that’s sort of the point. Having your work and leisure commitments mapped out for the weeks and months ahead in an easy to view format will allow you to see at a glance just how busy you are and whether you are taking on too much.

3) Spend 10 minutes doing nothing – Again, this is more productive than it sounds! Set your alarm ten minutes earlier every day so that, before you get up, you can spend this extra time in completely undisturbed silence, thinking about what your priorities should be for the day to come.

4) What are your two most important tasks? – Speaking of priorities, it is also a good idea to take a step back from time to time and decide which the two most important jobs are that you wish to accomplish on any given day. This is a great way of clearing your head when you feel overwhelmed.

5) Consider hiring household staff – You may have thought that hiring a nanny or other household staff might be the ‘easy way out’, but this is not the case. Those who have invested in professional assistance of this kind know that hiring a caring and responsible person to help run your busy home is a fantastic way of relieving domestic pressures.

Posted in Uncategorized | Comments Off on 5 New Year’s Resolutions for Busy Families

National League Teams Already Have DH, So Why Wait?

After nearly fifty years, the experiment will finally be recognized as a success. Baseball Commissioner Rob Manfred has hinted that the designated hitter, which the New York Times once called a “gimmick,” will be used in the National League.

It was in 1973 that teams in the Junior Circuit elected to have another player hit for the pitcher, a concept that most considered a short term effort to increase offense. History was made that spring when Ron Bloomberg stepped to the plate for the Yankees to become the first DH ever.

The DH quickly became a valuable tool for American League clubs, who went on to win five of the next seven World Series. Although the DH was not used during the Fall Classic, one must admit that it certainly proved advantageous in several respects during the season.

Because they did not have to bat, the American League pitchers were better rested with fewer bumps and bruises than their National League counterparts. The A.L. managers had happier players, since each team had nine starters and thus increased playing time for everybody.

Now that the Commissioner has broached the idea of the DH across the board, players on the National League teams can look forward to similar happiness. Manfred declared that the DH in the National League could come as early as the 2017 season. bolder move would be to institute the DH this year, an idea which would intensify the season as well as increase what has been an embarrassing lack of offense over the past half decade. This would be particularly welcome now, since almost half of the teams in the N.L. find themselves in complete rebuilding mode.

Not only would using the DH help these clubs compete, but it would also increase fan interest during the rebuild. Most clubs already have players who fit the DH mold perfectly, and here is the list of those sluggers.

Braves: Nick Swisher

The veteran has been a clutch hitter with decent power and pop throughout his career, but he currently has no spot in Atlanta’s regular lineup.

Brewers: Jonathan Lucroy and Chris Carter

Having Lucroy in the lineup without having to catch every day would certainly increase his production and career. He has already had experience at first, so he could occasionally allow Carter to get a defensive rest without losing his turn in the order.

Cardinals: Matt Adams

Adams would be the perfect DH, especially against right handers. A bonus for St. Louis would be using Yadier Molina as the DH against lefties, thereby preserving his health for a postseason run.

Cubs: Kyle Schwarber and Jorge Soler

Schwarber’s struggles in left were apparent in the playoffs last year, as he had been catcher for most of his career. With the DH in play, he could still catch on occasion and allow Soler to rest defensively.

Diamondbacks: Yasmany Tomas

The International free agent still has no true defensive home after an entire year in Arizona. He would be the perfect fit as DH, almost the Big Papi of the N.L.

Dodgers: Andre Ethier

Instead of trying to trade Ethier, as they have done for the past few winters, Los Angeles could have his quality bat in the lineup every day.

Giants: Buster Posey and Brandon Belt

The former Most Valuable Player and star catcher has already suffered several significant injuries behind the plate, so he has been used occasionally at first. Providing San Francisco with the option of the DH would help Posey’s production and lengthen his career, while allowing Belt more opportunities to spell the outfielders.

Marlins: Ichiro Suzuki

Another former M.V.P., Suzuki is still one of the most exciting players around. Seeing him bat every day would be a good reason for Miami fans to start coming to games. Mets: Wilmer Flores

Currently the fan favorite has no regular position, and he has enough power to warrant a role as the club’s DH.

Nationals: Clint Robinson

He is too good of a hitter to be a backup outfielder/first baseman, so Washington could really benefit from the implementation of the DH.

Padres: John Jay

He was acquired over the winter to be a backup outfielder, but a DH role could allow Jay to be a good veteran presence as San Diego undergoes a rebuilding year.

Phillies: Darrin Ruff

There is already controversy about Ruf taking playing time away from veteran All-Star Ryan Howard, a problem which the N.L. DH would immediately quell.

Pirates: Michael Morse

Had the DH come last year, the Pirates would probably have kept Pedro Alvarez. Nevertheless, Morse could fill a similar role in 2016.

Reds: Devan Mesoraco

Any doubt whether the catcher can fully recover from surgery to be an effective backstop, a situation that would leave Cincinnati without the All-Star’s valuable bat.

Rockies: Mark Reynolds

Reynolds, even though listed as a corner infielder, has always been the N.L.’s version of a DH. An edict from Manfred would simply make it official.

Posted in Uncategorized | Comments Off on National League Teams Already Have DH, So Why Wait?

Autodesk : Top 4 New Features

Autodesk introduced AutoCAD 2017 in March 2016 aiming to help its users stay at the forefront. This latest release lets you work quicker and smarter across connected desktop and mobile solutions, create personalized design experiences, easily team up with colleagues, and stay updated with the latest features and updates. AutoCAD 2017 also includes AutoCAD 360 Pro, a mobile app that allows users use AutoCAD on the go. The latest version addresses several user functionality requests and delivers features that enhance everything from workflows to graphics processing. According to Autodesk, several AutoCAD users globally will be benefitted by several enhancements that have been added in the latest version, such as enhanced 3D printing, new features such as ‘smart centrelines’, share design views on cloud and improvements to PDF handling features.

In the updated features of the 2017 version, PDFs have been added to the supported ‘import file’ formats. As a result, users can import geometry, True Type text and raster images from a PDF file or underlay into the current drawing as AutoCAD objects. Also, the centerlines and center marks get updated accordingly when users move associated objects. Learning content and product updates are seamlessly delivered to help users get the most out of new features with Autodesk Desktop app, an application that substitutes Autodesk Application Manager. Here, users also tend to get the latest security patches and updates for all 2015, 2016, and 2017 versions of Microsoft Windows based Autodesk products. Now, let’s discuss the top 4 new features that Autodesk has included in its AutoCAD 2017 release. Top 4 New Features in Autodesk AutoCAD 2017

Enhanced 3D printing

Utilising the new Autodesk print studio you can create a 3D print ready file and directly print it in nearly all types of 3D printers. This 3D printing tool is offered by spark technologies and is available for 64 bit machines only. To make full use of this tool, you need to go to AutoCAD 3D modelling workspace and select print studio tool from 3D print panel of output tab. If it’s the first time you are using this tool then a prompt will appear from where you can download this tool. After you’ve downloaded and installed, click on print studio again and click on watertight or closed mesh object from your drawing which you want to use for 3D printing.

Smart Centrelines and Centre marks

This new AutoCAD release lets you to easily add centre lines and centre marks to the geometry. Likewise, you need to type the command ‘Centremark’ and click on circular object to create the centre mark, you can use this command to make a centre mark on circle, arc and fillet. Share Design Views on Cloud

Now, you can directly share files with users who don’t even have AutoCAD using A360 cloud account and all they require is a web browser for accessing shared drawing. In order to share a drawing, ensure that you’re logged into your Autodesk 360 cloud and your drawing is saved.

Co-ordination Model

In AutoCAD 2017 coordination model functionality has been improved with support for object snaps. Attach a Navisworks or BIM 360 Glue model to your AutoCAD drawing so you can view it as an underlay. Then just use the standard AutoCAD endpoint and center object snaps to snap to exact locations as you create and edit your design based on the attached models.