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

Things To Do When Waiting For Exam Results

After your exams, you binge on caffeine, spend sleepless nights and bear a lot of stress. Well, it happens, especially when the result day is close. At times, the stress you have after exams is far intense than the stress you have during exams. There is no doubt that coping with this stress is difficult, but the tips below can help you keep the anxiety at arm’s length.

Move on

No matter what you do, you can’t go back in time to make changes. What is done is done. There is no use of comparing the answers. As a matter fact, doing so will do nothing except adding to your level of anxiety. So, take your time and move on.

Stay away from online forums

After your exams, stay away from online forums until the result announcement day. Although these forums are great places to spend time on, you shouldn’t go there just to see what others have to say about their performance in the exams. Reading the remarks of others about the exams on these online platforms may intensify your stress. Don’t sit idle

What you need to do is keep yourself busy. In other words, if you keep yourself occupied, your mind won’t pay attention to the result day. For instance, you can get a job or join a gym to keep yourself occupied. You can also start a hobby, such as gardening or photography.

Talk to a Friend

Spend time with your close friend and share your worries with them. Keeping it to yourself will only increase your depression. What you need to do is let your worries come out gradually at a certain pace rather than growing it inside you.

Write your worries on paper

In your free time, write you worries down on a piece of paper and then burn it down. While it seems odd, this technique will work wonders and you will feel better.

Sleep Well

Sleeping well is necessary if you want to stay fit both mentally and physically. It will also improve your quality of life. Ideally, you may want to get at least 8 hours of sleep in 24 hours.

Don’t drink

Alcohol can’t help you to stay happy. Instead, you should eat something healthy. You can drink milk or fruit juice, for instance. Be positive

Why should you be optimistic? Well, the biggest benefit of being positive is that it will help you lower your stress level. And this will help you deal with the stress on the result day. The least you can do is smile at others whenever you meet them. According to scientists, when you smile, you release a chemical known as endorphine. The stress hormone called Cortisol is also reduced. Therefore, you can get rid of stress by smiling.

In short, you will find these tips helpful. Keep in mind that stress will have a bad impact on your health. To stay in good shape, what you need to do is keep yourself busy, eat healthy and smile at others.

Posted in Uncategorized | Comments Off on Things To Do When Waiting For Exam Results

Tips For Buying And Maintaining Shoes

Choosing a good pair of shoes and taking good care of it is an art. This article has some basic tips for you to maintain the quality of your favorite shoes. Hopefully, this will help you make your shoes stand the test of time.

1. When buying shoes

When should you try your shoes before buying them? Well, ideally, you should try them in the evening. This is because your feet are slightly bigger in size in the evening. Go to your desired store in the evening, put on the shoes you want to try and then walk around to see how you feel in them.

If you have to move around a lot during the day, we suggest that you go for instant heels as these shoes distribute your weight evenly and you feel comfortable.
2. Posture and gait

What is the right way to walk? Proper gait can make your body appear slimmer, especially if you are a woman. The idea is to keep your feet straight when walking. For each step, you may want to hold a bit long striding. Keep in mind that improper gait and posture will make you feel less comfortable while walking and it may also make your shoes wear and tear faster. Usually, the biggest reason why people don’t feel comfortable while walking is that the shoes are not the right fit for them.

3. Cleaning the shoes

For wiping stains from your leather shoes, you can use banana peels. Actually, banana peels contain certain ingredients that make it easier for you to remove stains from your shoes. On the other side, you can also go for milk to wipe the surface of the shoes.

Another good cleaning agent is vinegar. It will clean your shoes and make them shine. The great thing about vinegar is that it is better than most of traditional cleaning methods.

4. Leather shoes Upkeep

Shoes made from leather tend to get stiff. In order to soften leather shoes, you can opt for a quality absorbent pad. However, keep in mind that this method should be used occasionally as the regular use may reduce the life of your shoes.

If your leather shoes are stiff, you can cut a potato in half and dip it in the lemon juice and then clean the surface of the shoes with it. Keep in mind that placing the shoes near fire is not recommended after the application of the cleaning method.
5. Drying Wet Shoes

If your shoes get wet, lime powder is a good agent to dry them out. Lime power will also give your shoes a sweet smell. For fur shoes, you can try a dryer, and this is an ideal method for drying shoes in winter.

So, these are a few tips that you can use to buy shoes pair of shoes and then take care of them so that they will stand the test of time. Keep in mind that buying expensive shoes is not a big deal. The big deal is to take care of their maintenance and make them last longer.

Posted in Uncategorized | Comments Off on Tips For Buying And Maintaining Shoes

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.

Posted in Uncategorized | Comments Off on Autodesk : Top 4 New Features

Less Than 1,000 Days Until the Next Total Solar Eclipse in the United States

On Monday, August 21, 2017, a total solar eclipse will be visible in some areas of the United States. This is now less than 1,000 days away. The event has been a long time coming. While the last total solar eclipse to be seen in the United States occurred in 1991, that event was limited to Hawaii. Before that, the last solar eclipse visible from the continental United States was on February 26, 1979.

While the 1979 event tracked across Oregon, Washington and Montana, people in 12 states will see the 2017 event. Both eclipses started in Oregon. The earlier one then tracked up into Canada. The 2017 eclipse starts in Oregon, travels across the central United States before finishing far out to sea beyond South Carolina.

A total solar eclipse is a rather rare occurrence. Estimates place the likelihood of any point on Earth experiencing one only every 400 years. This is not absolute, however. Several Oregon locations saw the 1979 eclipse and they will see the 2017 event as well. For them, experiencing two solar eclipses in a little more than 35 years is quite unusual. Closer yet are the cities of Carbondale, Illinois, and Cape Girardeau, Missouri. Residents there will see the 2017 eclipse as well as another in April, 2024. This separation of less than seven years for these two eclipses is very unusual. Of course, it may be hundreds of years before these cities see another.

To be a total eclipse, the moon must completely obscure the sun, for an observer standing on Earth. This can occur monthly, at New Moon. Ordinarily, however, the moon passes either above, or below, the sun’s position, as viewed from Earth. As a result, the moon’s shadow normally sweeps across open space. On rare occasions, as the moon passes directly in front of the sun, a shadow is cast upon the surface of the Earth. If the sun is partially obscured, a partial eclipse results. If the sun is completely obscured, a total solar eclipse occurs. The moon is much smaller than the sun, of course. In fact, the moon is some 400 times smaller. In an astronomical twist, the moon is also 400 times closer to the Earth. This makes the apparent size of the moon very close to the apparent size of the sun. When the moon passes directly in front of the sun, it is able to completely eclipse the sun, for some viewers on Earth.

The shadow cast by the moon, however, is very small. Depending on the distance between the Earth and the moon, which varies somewhat, the moon’s shadow will darken a strip of Earth about 70 miles wide. This strip is called the Zone of Totality. Those people located within this zone will experience a total solar eclipse. Those near, but outside, will see a partial solar eclipse.

On August 21, 2017, the sun is eclipsed for as much as 2 minutes and 40 seconds at the maximum point. Hopkinsville, Kentucky happens to be located at this point. People not located there may see a shorter eclipse duration. Those located outside the zone of totality will only see a partial eclipse. Some cities that will experience totality include Nashville, Tennessee, Kansas City and St. Louis, Missouri. The 2017 eclipse will potentially be seen by millions of people located across the United States.

Each total solar eclipse is unique, but there are similarities. The Earth will darken over time as the moon obscures more and more of the sun. This is the partial eclipse phase. As totality approaches, the amount of sunlight striking the Earth will be greatly diminished. The sky will become similar to twilight. Colors normally seen at sunset will be visible during the day. Birds, animals and insects will be fooled into believing that night is falling. Some will return to their nests or roosts. Nocturnal creatures will begin to emerge. These effects often happen even if a total solar eclipse occurs early in the morning. After totality ends, another partial eclipse phase occurs until the moon passes beyond the sun’s location.

The biggest factor that cannot be predicted with certainty is the weather on August 21, 2017. Cloudy weather could obscure the eclipse for interested observers. As a result, many people examine historical weather patterns in order to determine prime eclipse viewing locations. Since the 2017 event occurs in August, there are some rather promising weather possibilities. In Oregon, the August weather tends to be sunny and dry, perfect eclipse conditions. Morning fog, storms, or clouds, could thwart eclipse viewers, however.

Idaho and Wyoming residents will also experience the 2017 eclipse. The weather in these states could allow a very good eclipse viewing experience. The eclipse occurs fairly early in the day, lessening the possibility of localized thunderstorms.

As the total solar eclipse tracks across more states, from Nebraska to South Carolina, the possibility of inclement weather increases. These locations will experience the eclipse later in the day. Afternoon storms, or hazy weather, could be encountered. Such weather could limit the eclipse experience.

Many US cities have already begun planning for the August 21, 2017 total solar eclipse. The event represents an opportunity to entertain tens of thousands of visitors to cities located within the zone of totality. With proper attention to details, cities can provide a favorable eclipse experience that also highlights the attractions of the local area. Weather permitting, of course.

Bonus Facts:

– the distance from the Earth to the moon increases each year. In less than 1.5 billion years, the moon will not be close enough to produce total solar eclipses. After that, only partial or annular eclipses will occur.

– when the moon eclipses the sun, the sky darkens enough to allow planets and bright stars to be seen in the daytime. On August 21, 2017, the bright star Rigel should be visible low in the south. – Albert Einstein predicted that a total solar eclipse could provide direct proof of the General Theory of Relativity. He postulated that the eclipsed sun would cause light to be bent, for an observer on Earth. This would be proved as stars located behind the sun would appear to be shifted in location. This visual evidence was demonstrated during an eclipse in 1919.

– as the moon passes in front of the sun, it blocks enough sunlight that the solar corona, the super heated atmosphere, becomes visible to people on Earth. The shape of the corona is different during each eclipse as it is influenced by the level of magnetic solar storms, which constantly changes.

– ancient civilizations did not understand the science responsible for total solar eclipses. Eclipses were attributed to supernatural causes and thought to be bad omens.

– the theoretical maximum duration of a total solar eclipse is about 7 minutes. The 2017 eclipse is less than half this duration, at 2 minutes, 40 seconds for those located in Hopkinsville, Kentucky.

– the sun is not safe to view during any portion of the partial eclipse phase. Even if only 1% of the sun is visible, observers risk damage to their eyes through direct observation. At this eclipse stage, the sun appears to be dim enough to view. Unfortunately, the lit portion still transmits full force sunlight to the optic nerve. Because the level of light is so much lower than normal, the observer feels no urge to avert their gaze. Moreover, the optic nerve does not contain pain receptors so victims are unaware that their eyesight is being damaged. Proper eye protection is vital for all observers of the partial solar eclipse phase.

Posted in Uncategorized | Comments Off on Less Than 1,000 Days Until the Next Total Solar Eclipse in the United States