Showing posts with label how. Show all posts
Showing posts with label how. Show all posts
Tuesday, March 3, 2015
How to Make Portrait Slides in PowerPoint!
Its time for another technology tip, and this one is actually surprisingly easy! If PowerPoint is your go-to program for creating teacher resources then youll love this one!

More than half of you voted for this in the poll, but the other options were definitely still contenders! Dont forget to vote on next weeks poll!
Heres the tutorial!


For next weeks poll, Im going to add how to make easy page borders in Microsoft Word! Heres an example of one....

Read more »

More than half of you voted for this in the poll, but the other options were definitely still contenders! Dont forget to vote on next weeks poll!
Heres the tutorial!

You can download this tutorial as a PDF by clicking this picture!

Note: This tutorial is hosted on Google Docs. To save it from there, just open the file and click File > Download to save onto your computer!
For next weeks poll, Im going to add how to make easy page borders in Microsoft Word! Heres an example of one....
How to Easily Make Your Text Italic
I just love the look of italic text! I love that it makes things stand out without making them in your face like bold does. Its a nice simple way to accentuate something.
Well... if you use italic text in Microsoft Word, PowerPoint, Publisher, or if you use it on Blogger, this tip will save you a little bit of time!

Read more »
Well... if you use italic text in Microsoft Word, PowerPoint, Publisher, or if you use it on Blogger, this tip will save you a little bit of time!

Saturday, February 28, 2015
How to Create a Customized Google Search!
This is a super fun tip... I could have used it back when I did my student teaching in 2nd grade! It would have been perfect to go along with my lesson plans for the students animal research projects! Anyhow... this week Ill be writing about how to make google search only specific websites!



If you want to know how to add that code to your blog, you can check out my previous tutorial here:


For next weeks tutorial, Ill be adding how to make your own bunting banner!
Read more »


If you want to know how to add that code to your blog, you can check out my previous tutorial here:

You can download this tutorial as a PDF by clicking this picture!

Note: This tutorial is hosted on Google Drive. To save it from there, just open the file and click File > Download to save onto your computer!
For next weeks tutorial, Ill be adding how to make your own bunting banner!
Friday, February 27, 2015
How to Add Another Websites Photo to Your Blog! Without HTML
This weeks technology tutorial is one that is surprisingly very easy... how to add another websites photo to your blog (without HTML!). I love using this trick when I do linky parties or when I link to someone elses blog (if they dont have the HTML code poster for a blogger button, that is!)





For next weeks poll, Ill add another blogger option... how to add a facebook "like" box to your sidebar (look at my side bar for an example!) Then your blog followers can click one button on your blog to become a follower on facebook!
Read more »

This won the poll, but only by a little bit!


Check out the finished product here:
Be sure to check out Danas blog while youre here.... she has some great ideas and great items!
Also, please note that I used the tutorial above to add the image, but I had to add the link to her website manually! The only thing the tutorial copies is the image, not the hyperlink!
You can download this tutorial as a PDF by clicking this picture!

Note: This tutorial is hosted on Google Docs. To save it from there, just open the file and click File > Download to save onto your computer!
For next weeks poll, Ill add another blogger option... how to add a facebook "like" box to your sidebar (look at my side bar for an example!) Then your blog followers can click one button on your blog to become a follower on facebook!
Thursday, February 26, 2015
How to Make a Collage of Pictures in Any Shape!
Its Tuesday again, so obviously its time for another technology tutorial! This one is definitely one of my favorite... how to make a collage of pictures in any shape you want!

This poll won by a pretty large margin, but there were definitely some other contenders... itll be interesting to see what wins next week!

Now, onto the tutorial! This tutorial uses the program Shape Collage, which you can download by clicking that link.






I have so many ideas for how I want to use this program in the classroom this year! Primarily, I want to make a collage of photos of my students in the shape of the Cat in the Hats hat... but I think it has tons of other uses as well!
My students always seem to struggle with the "Which one does not belong?" questions on a test, despite tons of practice. Im thinking I can make cute photo collages to use for this activity... for example, using all pictures of winter items in the shape of a winter hat, with a summer image placed in as well. I think the kids will have a blast playing "I Spy" to look for the picture that doesnt belong... plus this shape will give them a hint as to the category it belongs in, which would make a great introduction point!
How do you think youll use this in your classroom?
As for next weeks poll, I did promise last week that Id add how to add HTML code to a blog post. Im excited to see which one wins this time!
Read more »

This poll won by a pretty large margin, but there were definitely some other contenders... itll be interesting to see what wins next week!
Now, onto the tutorial! This tutorial uses the program Shape Collage, which you can download by clicking that link.





You can download this tutorial as a PDF by clicking this picture!

Note: This tutorial is hosted on Google Docs. To save it from there, just open the file and click File > Download to save onto your computer!
I have so many ideas for how I want to use this program in the classroom this year! Primarily, I want to make a collage of photos of my students in the shape of the Cat in the Hats hat... but I think it has tons of other uses as well!
My students always seem to struggle with the "Which one does not belong?" questions on a test, despite tons of practice. Im thinking I can make cute photo collages to use for this activity... for example, using all pictures of winter items in the shape of a winter hat, with a summer image placed in as well. I think the kids will have a blast playing "I Spy" to look for the picture that doesnt belong... plus this shape will give them a hint as to the category it belongs in, which would make a great introduction point!
How do you think youll use this in your classroom?
As for next weeks poll, I did promise last week that Id add how to add HTML code to a blog post. Im excited to see which one wins this time!
How Do I View Articulate Presentations On an iPad
Watching or playing with anything in Flash Format on an iPad (iPhone or iPod) was impossible (as far as I know) in the past. Well, now you can at least view Flash stuff on an iPad using the app called iSWIFTER (Source).
HOW?
Here we go:
HOW?
Here we go:
Click here to keep yourself updated with latest discussions about Articulate on iPads.
STILL TROUBLESOME!
Alright, it is still troublesome, but I suppose within the next few months Steve Jobs will figure out that supporting Flash is not so bad after all (Otherwise most e-learning content in Malaysia will be useless on an iPad). Or perhaps Adobe (behind Flash) figures out a way to please all Steve Jobs requirements to make Flash safe and smooth in an Apple world.
As for now, you will have to use apps like iSWIFTER to explore your Articulate presentations on an iPad. Lets hope that Apple embraces Flash fully in the near future. If not, then we have to find creative solutions, because certainly it will be tough to learn without an iPad or iPhone in the future.
But, how do we view Articulate presentations on an iPhone? Can anyone enlighten us with possibilities? :)
Labels:
an,
articulate,
do,
how,
i,
ipad,
on,
presentations,
view
Wednesday, February 18, 2015
How to Swap Two Numbers Without Using Temporary Variable or Arithmetic Operators
You have done swapping of two numbers using temporary variable or by using arithmetic operators. It can be done in following way.
Lets take two numbers a=5 and b=7.
Using Temporary Variable
temp=a; //temp becomes 5
a=b; //a becomes 7
b=temp; //b becomes 5
Also Read: C++ program to swap two numbers using pointers
Also Read: C++ program to swap two numbers using class
Using Arithmetic Operators
a=a+b; //a becomes 12
b=a-b; //b becomes 5
a=a-b; //a becomes 7
or
a=a*b; //a becomes 35
b=a/b; //b becomes 5
a=a/b; //a becomes 7
In this article I am sharing another method, may be you are already familiar with it. Swapping of two numbers can also be done by using bitwise XOR operator i.e. ^. The XOR of two numbers a and b returns a number which has all the bits as 1 wherever bits of a and b differ. If bits are same then resultant bit will be 0.
For example binary of 5 is 0101 and 7 is 0111. If you do XOR of 5 and 7 then result will be 0010. A c program is given below that uses this concept to swap values of two numbers.
Also Read: C++ program to swap two numbers using macros
Also Read: C++ Templates: Program to Swap Two Numbers Using Function Template
#include <stdio.h>
int main()
{
int a=5,b=7;
a=a^b; // a becomes 2 (0010)
b=a^b; // b becomes 5 (0101)
a=a^b; // a becomes 7 (0111)
printf("After Swapping: a=%d,b=%d",a,b);
return 0;
}
If you have any doubts or know any other method to swap values of two numbers then mention it in comment section.
Happy Coding!! :) :)
Source: http://www.geeksforgeeks.org/swap-two-numbers-without-using-temporary-variable/
Monday, February 16, 2015
How You Can Keep Your Android Phone Safe From Hackers

Right when the market is flooding with the super gadgets, there is a subsequent increment in hackers who keep agitating smart phones with their nasty techniques. Basically smartphones are used for several purposes both online and offline almost like PC or laptops but as the same it also has possibility of getting hacked like any other sophisticated gadget. Hence, it is essential to pay attention towards the application that you use or install. Also a kind a data that you are storing in your smartphone matters a lot in this issue of hacking the android device.
Also Read: The Top 4 Websites to Create Android Apps Online for Free
Also Read: The Top 8 Best Alternatives to Google Play Store to Download Android Apps for Free
This article will focus on the tips which can empower the smartphones safety from hackers.
Security lock
It is the basic thing that you can access to secure data on the mobile handset. It is advised to have a password with the combination of both characters, symbols and numbers. It is essential to ensure that in case there is a password failure you need check change the password.
Connectivity
Some of the smartphone users keep their Bluetooth and Wi-Fi always on which is not good for the mobile phone’s health. Turn off these features when it is not required as they often connect data to the network that you are using. Don’t switch over to too many networks as it put you to the hacker’s risk.
Use minimal amount of public network
As per the current research on the hacking problem, using public Wi-Fi is the most dangerous thing to do. Connecting your device to the public network as well as hotspot is pretty risky thus you need to ensure that the concerned network is safe and secured. Beware of not using online banking or any confidential document on the public connectivity.
Free but fatal apps
Don’t get attracted with too many free applications and always go for the trusted and authenticated websites. People who tend to download the application from the random website may be targeted by the malware, spyware, worms and viruses. Don’t allow these applications to access your password in any case.
Keep your device clean
It is essential to keep your device clean and healthy and install the latest and updated version of security system. If you are using too much of internet connectivity then install both the antivirus and internet security.
Mobile theft
Mobile theft is increasing day by day and then it hardly takes anytime to lose your mobile phone. One of the major problems comes on your way then it losing all the confidential data so need to use certain applications which can immediately lock all the stored data.
The remote-wipe app
When nothing works, you can take care of your device by installing this wonderful application that will help you to remote access your device and its content.
Also Read: The 4 Best Live Chat Mobile Applications
Also Read: 4 Best Tips to Clean Your Touch Screen Device
Android rooted phones come at the bigger risk
Rooting android phones open dimension of exploring new features but at same it also becomes a bit risky while using the unauthorised apps and software.
About Author:
This is a guest post written by Tarun, He is a blogger and writes about Android on his blog AndroidCubes. He recommends you to check his latest guide to Root Micromax A35 Bolt.
Wednesday, February 4, 2015
How To Download Firefox Without Using Internet Explorer


Internet Expolere-Hater Often Say That The Only GooD Use 4 Internet Explorer is Downloading Firefox or Chrome. But if You Really Dont like IE, You Can Use Windows Built-in FTP Support To Download and Install Firefox Without Ever Opening IE. Sure, You Could Just Open Internet Explorer and Download Firefox Frrom Mozilla website. But Where The Geeky Fun in That? This Trick is About Firefox Beacuse Mazilla Provides an FTP Server, While GooGle Does Not Seem to Downloading Firefox Without Using Internet Explorer May Also Come in Handly if Internet Explorer is Crashing ans is not Working Properly on Your System.
Graphical Method With Windows Explorere:
To Access Mozilaa FTP Server in Windows Explorer, Type ftp://mozilla.org into Explorer Address Bar and Press Enter.

Navigate to the following Folder.
pub/firefox/releases/latest/win32/en-US/
You Can Also Just Enter The Following Address in Windows Explorer to Go Directly To The Appropriate Folder on Mozilla FTP Server.
ftp://ftp.mozilla.org/pub/firefox/releases/latest/win32/en-US/

Now Copy The Firefox setup.exe File To Your Computer, You Can Drag & Drop It, Use The Copy to Folder Option in Its Right-Click Menu, or Do a Copy and Paste.

Window Explorer Will Download The Firefox Installer To Your Computer, No IE Involved.

You Can Then Launch The Fire Steup Application to Install Fiefox.

Command Line Method With Command Prompt:
If The Above Trick Was Not Geekly Enough For You, You Can also Download Firefox Using the ftp Utility in The Windows Command Prompt. Launch a Command Prompt Window From The Start Menu and Type The Following Command to Connect To Nozilla FTP Server..
fttp ftp.mozilla.org
Type Anonymous at the Login Prompt, Then Leave The Password Field Balnk & Press Enter

Use The Following Command to Change to The Directory Containing The Lates Release of Firefox:
cd pub/mozilla.org/firfox/releases/latest/win32/en-USg
Then, Run The Following Command to See a List of The Files in The Diresctory:
Is

Use The Get Command to Download The Latest Firefox Installer to Your Hard Driver:
get "Firefox Setup 15.0.1.exe"
Replace the File Name in The Above Command with the Name of The Current Version, This is Displayed Beneath Is Command.

The Download Firefox Setup.exe file Will Appear in Your User Folder ar C:UsersNAME.

You Can Also Use Windows Explorer and the ftp Command to Connect to Other FTP Servers You Have Access to if You Have Upload Access to an FTP Server, You Can Use These Tools to Upload Files- You Dont Necessarily Need a Third-Party FTP Program.
Tuesday, February 3, 2015
How to Change Facebook Theme in Urdu and Hindi

This post would help the visitor if they searching about "How to change facebook theme and style" if you want to change different look on Facebook. Every people knows that facebook is the No. 1 social networking site and daily more and more people are joint to this network. At that time many people are using there facebook account through phones / mobiles, smartphones and even from tablets so if you are not happy with Facebook current theme and want to see something unique color and text then this post surely help you. if you are not happy with facebook by default look then now you can change its look, themes, change background, text style easily on Mozilla Firefox add-ones and google chrome extension.
Conclusion :
Facebook is a very nice platform where people are engage each other and sharing their experience, website post, new services, updates. So many people are working day by day in this site and their eyes not happy to see Facebook by default theme. I hope this tutorial post surely help them to change their facebook style and theme.
Six programming paradigms that will change how you think about coding
Every now and then, I stumble across a programming language that does something so different that it changes how I think about coding. In this post, I want to share some of my favorite finds.
This is not your grandmas "functional programming will change the world!" blog post: this list is much more esoteric. Id wager most readers havent heard of the majority of the languages and paradigms below, so I hope you have as much fun learning about these new concepts as I did.
Note: I have only minimal experience with most of the languages below: I find the ideas behind them fascinating, but claim no expertise in them, so please point out any corrections and errors. Also, if youve found any new paradigms and ideas not covered here, please share them!
Update: this post hit the front page of r/programming and HN. Thank you for the great feedback! Ive added some corrections below.
Concurrent by default
Example languages: ANI, Plaid
Lets kick things off with a real mind bender: there are programming languages out there that are concurrent by default. That is, every line of code is executed in parallel!
For example, imagine you wrote three lines of code, A, B, and C:
In most programming languages, A would execute first, then B, and then C. In a language like ANI, A, B, and C would all execute at the same time!
Control flow or ordering between lines of code in ANI is merely a side effect of explicit dependencies between lines of code. For example, if B had a reference to a variable defined in A, then A and C would execute at the same time, and B would execute only after A finished.
Lets look at an example in ANI. As described in the tutorial, ANI programs consists of "pipes" and "latches" that are used to manipulate streams and data flows. The unusual syntax is tough to parse, and the language seems dead, but the concepts are pretty interesting.
Heres a "Hello World" example in ANI:
In ANI terminology, we are sending the
Both of these lines of code execute in parallel, so they could end up in any order in the console. Now, look what happens when we introduce a variable on one line and reference it later:
The first line declares a "latch" (latches are a bit like variables) called
The Plaid language also claims to support concurrency by default, but uses a permissions model, as described in this paper, to setup control flow. Plaid also explores other interesting concepts, such as Typestate-Oriented Programming, where state changes become a first class citizen of the language: you define objects not as classes, but as a series of states and transitions that can be checked by the compiler. This seems like an interesting take on exposing time as a first class language construct as discussed in Rich Hickeys Are we there yet talk.
Multicore is on the rise and concurrency is still harder than it should be in most languages. ANI and Plaid offer a fresh a fresh take on this problem that could lead to amazing performance gains; the question is whether "parallel by default" makes concurrency easier or harder to manage.
Update: the description above captures the basic essence of ANI and Plaid, but I used the terms "concurrent" and "parallel" interchangeably, even though they have different meanings. See Concurrency Is Not Parallelism for more info.
Dependent types

Example languages: Idris, Agda, Coq
Youre probably used to type systems in languages like C and Java, where the compiler can check that a variable is an integer, list, or string. But what if your compiler could check that a variable is "a positive integer", "a list of length 2", or "a string that is a palindrome"?
This is the idea behind languages that support dependent types: you can specify types that can check the value of your variables at compile time. The shapeless library for Scala adds partial, experimental support (read: probably not ready for primetime) for dependent types to Scala and offers an easy way to see some examples.
Here is how you can declare a
This creates a variable
The example above works fine because the type system knows both
Shapeless is an amazing library, but from what Ive seen, its still a bit rough, only supports a subset of dependent typing, and leads to fairly verbose code and type signatures. Idris, on the other hand, makes types a first class member of the programming language, so the dependent type system seems much more powerful and clean. For a comparison, check out the Scala vs Idris: Dependent Types, Now and in the Future talk:
Formal verification methods have been around for a long type, but were often too cumbersome to be usable for general purpose programming. Dependent types in languages like Idris, and perhaps even Scala in the future, may offer lighter-weight and more practical alternatives that still dramatically increase the power of the type system in catching errors. Of course, no dependent type system can catch all errors due to to ineherent limitations from the halting problem, but if done well, dependent types may be the next big leap for static type systems.
Concatenative languages
Example languages: Forth, cat, joy
Ever wonder what it would be like to program without variables and function application? No? Me neither. But apparently some folks did, and they came up with concatenative programming. The idea is that everything in the language is a function that pushes data onto a stack or pops data off the stack; programs are built up almost exclusively through functional composition (concatenation is composition).
This sounds pretty abstract, so lets look at a simple example in cat:
Here, we push two numbers onto the stack and then call the
Lets walk through this line by line:
This style of programming has some interesting properties: programs can be split and concatenated in countless ways to create new programs; remarkably minimal syntax (even more minimal than LISP) that leads to very concise programs; strong meta programming support. I found concatenative programming to be an eye opening thought experiment, but Im not sold on its practicality. It seems like you have to remember or imagine the current state of the stack instead of being able to read it from the variable names in the code, which can make it hard to reason about the code.
Declarative programming
Example languages: Prolog, SQL
Declarative programming has been around for many years, but most programmers are still unaware of it as a concept. Heres the gist: in most mainstream languages, you describe how to solve a particular problem; in declarative languages, you merely describe the result you want, and the language itself figures out how to get there.
For example, if youre writing a sorting algorithm from scratch in C, you might write the instructions for merge sort, which describes, step by step, how to recursively split the data set in half and merge it back together in sorted order: heres an example. If you were sorting numbers in a declarative language like Prolog, youd instead describe the output you want: "I want the same list of values, but each item at index
If youve used SQL, youve done a form of declarative programming and may not have realized it: when you issue a query like
The beauty of declarative languages is that they allow you to work at a much higher level of abstraction: your job is just to describe the specification for the output you want. For example, the code for a simple sudoku solver in prolog just lists out what each row, column, and diagonal of a solved sudoku puzzle should look like:
Here is how you would run the sudoku solver above:
The downside, unfortunately, is that declarative programming languages can easily hit performance bottlenecks. The naive sorting algorithm above is likely
Symbolic programming

Example languages: Aurora
The Aurora language is an example of symbolic programming: the "code" you write in these languages can include not only plain text, but also images, math equations, graphs, charts, and more. This allows you to manipulate and describe a large variety of data in the format native to that data, instead of describing it all in text. Aurora is also completely interactive, showing you the results from each line of code instantly, like a REPL on steroids.
The Aurora language was created by Chris Granger, who also built the Light Table IDE. Chris outlines the motivation for Aurora in his post Toward a better programming: some of the goals are to make programming more observable, direct, and reduce incidental complexity. For more info, be sure to see Bret Victors incredible talks: Inventing on Principle, Media for Thinking the Unthinkable, and Learnable Programming.
Update: "symbolic programming" is probably not the right term to use for Aurora. See the Symbolic programming wiki for more info.
Knowledge-based programming

Examples: Wolfram Language
Much like the Aurora language mentioned above, The Wolfram Language is also based on symbolic programming. However, the symbolic layer is merely a way to provide a consistent interface to the core of the Wolfram Language, which is knowledge-based programming: built into the language is a vast array of libraries, algorithms, and data. This makes it easy to do everything from graphing your Facebook connections, to manipulating images, to looking up the weather, processing natural language queries, plotting directions on a map, solving mathematical equations, and much more.
I suspect the Wolfram Languages has the largest "standard library" and data set of any language in existence. Im also excited by the idea that Internet connectivity is an inherent part of writing the code: its almost like an IDE where the auto-complete function does a google search. Itll be very interesting to see if the symbolic programming model is as flexible as Wolfram claims and can truly take advantage of all of this data.
Update: although Wolfram claims the Wolfram Language supports "symbolic programming" and "knowledge programming", these terms have slightly different definitions. See the Knowledge level and Symbolic Programming wikis for more info.
Read more »
This is not your grandmas "functional programming will change the world!" blog post: this list is much more esoteric. Id wager most readers havent heard of the majority of the languages and paradigms below, so I hope you have as much fun learning about these new concepts as I did.
Note: I have only minimal experience with most of the languages below: I find the ideas behind them fascinating, but claim no expertise in them, so please point out any corrections and errors. Also, if youve found any new paradigms and ideas not covered here, please share them!
Update: this post hit the front page of r/programming and HN. Thank you for the great feedback! Ive added some corrections below.
Concurrent by default

Lets kick things off with a real mind bender: there are programming languages out there that are concurrent by default. That is, every line of code is executed in parallel!
For example, imagine you wrote three lines of code, A, B, and C:
In most programming languages, A would execute first, then B, and then C. In a language like ANI, A, B, and C would all execute at the same time!
Control flow or ordering between lines of code in ANI is merely a side effect of explicit dependencies between lines of code. For example, if B had a reference to a variable defined in A, then A and C would execute at the same time, and B would execute only after A finished.
Lets look at an example in ANI. As described in the tutorial, ANI programs consists of "pipes" and "latches" that are used to manipulate streams and data flows. The unusual syntax is tough to parse, and the language seems dead, but the concepts are pretty interesting.
Heres a "Hello World" example in ANI:
In ANI terminology, we are sending the
"Hello, World!" object (a string) to the std.out stream. What happens if we send another string to std.out?Both of these lines of code execute in parallel, so they could end up in any order in the console. Now, look what happens when we introduce a variable on one line and reference it later:
The first line declares a "latch" (latches are a bit like variables) called
s that contains a string; the second line sends the text "Hello, World!" to s; the third line "unlatches" s and sends the contents to std.out. Here, you can see ANIs implicit program sequencing: since each line depends on the previous one, this code will execute in the order it is written.The Plaid language also claims to support concurrency by default, but uses a permissions model, as described in this paper, to setup control flow. Plaid also explores other interesting concepts, such as Typestate-Oriented Programming, where state changes become a first class citizen of the language: you define objects not as classes, but as a series of states and transitions that can be checked by the compiler. This seems like an interesting take on exposing time as a first class language construct as discussed in Rich Hickeys Are we there yet talk.
Multicore is on the rise and concurrency is still harder than it should be in most languages. ANI and Plaid offer a fresh a fresh take on this problem that could lead to amazing performance gains; the question is whether "parallel by default" makes concurrency easier or harder to manage.
Update: the description above captures the basic essence of ANI and Plaid, but I used the terms "concurrent" and "parallel" interchangeably, even though they have different meanings. See Concurrency Is Not Parallelism for more info.
Dependent types

Example languages: Idris, Agda, Coq
Youre probably used to type systems in languages like C and Java, where the compiler can check that a variable is an integer, list, or string. But what if your compiler could check that a variable is "a positive integer", "a list of length 2", or "a string that is a palindrome"?
This is the idea behind languages that support dependent types: you can specify types that can check the value of your variables at compile time. The shapeless library for Scala adds partial, experimental support (read: probably not ready for primetime) for dependent types to Scala and offers an easy way to see some examples.
Here is how you can declare a
Vector that contains the values 1, 2, 3 with the shapeless library:This creates a variable
l1 whos type signature specifies not only that its a Vector that contains Ints, but also that it is a Vector of length 3. The compiler can use this information to catch errors. Lets use the vAdd method in Vector to perform a pairwise addition between two Vectors:The example above works fine because the type system knows both
Vectors have length 3. However, if we tried to vAdd two Vectors of different lengths, wed get an error at compile time instead of having to wait until run time!Shapeless is an amazing library, but from what Ive seen, its still a bit rough, only supports a subset of dependent typing, and leads to fairly verbose code and type signatures. Idris, on the other hand, makes types a first class member of the programming language, so the dependent type system seems much more powerful and clean. For a comparison, check out the Scala vs Idris: Dependent Types, Now and in the Future talk:
Formal verification methods have been around for a long type, but were often too cumbersome to be usable for general purpose programming. Dependent types in languages like Idris, and perhaps even Scala in the future, may offer lighter-weight and more practical alternatives that still dramatically increase the power of the type system in catching errors. Of course, no dependent type system can catch all errors due to to ineherent limitations from the halting problem, but if done well, dependent types may be the next big leap for static type systems.
Concatenative languages
![]() |
| cat |
Ever wonder what it would be like to program without variables and function application? No? Me neither. But apparently some folks did, and they came up with concatenative programming. The idea is that everything in the language is a function that pushes data onto a stack or pops data off the stack; programs are built up almost exclusively through functional composition (concatenation is composition).
This sounds pretty abstract, so lets look at a simple example in cat:
Here, we push two numbers onto the stack and then call the
+ function, which pops both numbers off the stack and pushes the result of adding them back onto the stack: the output of the code is 5. Heres a slightly more interesting example:Lets walk through this line by line:
- First, we declare a function
foo. Note that functions in cat specify no input parameters: all parameters are implicitly read from the stack. foocalls the<function, which pops the first item on the stack, compares it to 10, and pushes eitherTrueorFalseback onto the stack.- Next, we push the values 0 and 42 onto the stack: we wrap them in brackets to ensure they get pushed onto the stack unevaluated. This is because they will be used as the "then" and "else" branches (respectively) for the call to the
iffunction on the next line. - The
iffunction pops 3 items off the stack: the boolean condition, the "then" branch, and the "else" branch. Depending on the value of the boolean condition, itll push the result of either the "then" or "else" branch back onto the stack. - Finally, we push 20 onto the stack and call the
foofunction. - When all is said and done, well end up with the number 42.
This style of programming has some interesting properties: programs can be split and concatenated in countless ways to create new programs; remarkably minimal syntax (even more minimal than LISP) that leads to very concise programs; strong meta programming support. I found concatenative programming to be an eye opening thought experiment, but Im not sold on its practicality. It seems like you have to remember or imagine the current state of the stack instead of being able to read it from the variable names in the code, which can make it hard to reason about the code.
Declarative programming
![]() |
| GNU Prolog |
Declarative programming has been around for many years, but most programmers are still unaware of it as a concept. Heres the gist: in most mainstream languages, you describe how to solve a particular problem; in declarative languages, you merely describe the result you want, and the language itself figures out how to get there.
For example, if youre writing a sorting algorithm from scratch in C, you might write the instructions for merge sort, which describes, step by step, how to recursively split the data set in half and merge it back together in sorted order: heres an example. If you were sorting numbers in a declarative language like Prolog, youd instead describe the output you want: "I want the same list of values, but each item at index
i should be less than or equal to the item at index i + 1". Compare the previous C solution to this Prolog code:If youve used SQL, youve done a form of declarative programming and may not have realized it: when you issue a query like
select X from Y where Z, you are describing the data set youd like to get back; its the database engine that actually figures out how to execute the query. You can use the explain command in most databases to see the execution plan and figure out what happened under the hood.The beauty of declarative languages is that they allow you to work at a much higher level of abstraction: your job is just to describe the specification for the output you want. For example, the code for a simple sudoku solver in prolog just lists out what each row, column, and diagonal of a solved sudoku puzzle should look like:
Here is how you would run the sudoku solver above:
The downside, unfortunately, is that declarative programming languages can easily hit performance bottlenecks. The naive sorting algorithm above is likely
O(n!); the sudoku solver above does a brute force search; and most developers have had to provide database hints and extra indices to avoid expensive and inefficient plans when executing SQL queries.Symbolic programming

Example languages: Aurora
The Aurora language is an example of symbolic programming: the "code" you write in these languages can include not only plain text, but also images, math equations, graphs, charts, and more. This allows you to manipulate and describe a large variety of data in the format native to that data, instead of describing it all in text. Aurora is also completely interactive, showing you the results from each line of code instantly, like a REPL on steroids.
The Aurora language was created by Chris Granger, who also built the Light Table IDE. Chris outlines the motivation for Aurora in his post Toward a better programming: some of the goals are to make programming more observable, direct, and reduce incidental complexity. For more info, be sure to see Bret Victors incredible talks: Inventing on Principle, Media for Thinking the Unthinkable, and Learnable Programming.
Update: "symbolic programming" is probably not the right term to use for Aurora. See the Symbolic programming wiki for more info.
Knowledge-based programming

Examples: Wolfram Language
Much like the Aurora language mentioned above, The Wolfram Language is also based on symbolic programming. However, the symbolic layer is merely a way to provide a consistent interface to the core of the Wolfram Language, which is knowledge-based programming: built into the language is a vast array of libraries, algorithms, and data. This makes it easy to do everything from graphing your Facebook connections, to manipulating images, to looking up the weather, processing natural language queries, plotting directions on a map, solving mathematical equations, and much more.
I suspect the Wolfram Languages has the largest "standard library" and data set of any language in existence. Im also excited by the idea that Internet connectivity is an inherent part of writing the code: its almost like an IDE where the auto-complete function does a google search. Itll be very interesting to see if the symbolic programming model is as flexible as Wolfram claims and can truly take advantage of all of this data.
Update: although Wolfram claims the Wolfram Language supports "symbolic programming" and "knowledge programming", these terms have slightly different definitions. See the Knowledge level and Symbolic Programming wikis for more info.
Monday, February 2, 2015
Flash 8 Masking Effect How to Create a Mask in Flash 8 Video Tutorials
In this series of Macromedia Flash 8 video tutorial clips, well show you how to create a Flash 8 Masking effect. A Flash 8 mask layer can be used to hide some portions of a layer underneath it, revealing only select areas. Its pretty simple and easy to learn, but there are a number of different, creative ways to make use of a mask in flash.
In part 1, well show you a simple example that demonstrates the Flash 8 masking effect.
[ALTERNATE LINK]
In part 2 of Working with Flash 8 Masking, well be creating the layer that will be masked. This layer will consist of some text.
[ALTERNATE LINK]
In part 3 of Working with Flash 8 Masking, we will be creating the motion tween animation in the layer that we will use as the mask. The motion tween animation will consist of a circle that moves from the left to the right side of the stage.
[ALTERNATE LINK]
In part 4 of Working with Flash 8 Masking, well show you how to convert a regular layer into a layer mask.
[ALTERNATE LINK]
In part 5 of Working with Flash 8 Masking, well show you how to edit an already existing layer mask.
[ALTERNATE LINK]
Read more »
Part 1: Working with Flash 8 Masking - What is a Layer Mask?
In part 1, well show you a simple example that demonstrates the Flash 8 masking effect.
[ALTERNATE LINK]
Part 2: Working with Flash 8 Masking - Creating the Layer that will be Masked
NOTE: If youre working in Flash CS5 and youre having trouble finding the Static Text type option, make sure that in the Properties Inspector (while you have the Text Tool selected), you have Classic Text instead of TLF Text selected.In part 2 of Working with Flash 8 Masking, well be creating the layer that will be masked. This layer will consist of some text.
[ALTERNATE LINK]
Part 3: Working with Flash 8 Masking - Creating the Animation in the Mask Layer
NOTE: If youre following along with this video, but youre working in Flash CS5, choose Create Classic Tween instead of Create Motion Tween.In part 3 of Working with Flash 8 Masking, we will be creating the motion tween animation in the layer that we will use as the mask. The motion tween animation will consist of a circle that moves from the left to the right side of the stage.
[ALTERNATE LINK]
Part 4: Working with Flash 8 Masking - Converting a Layer into a Mask
In part 4 of Working with Flash 8 Masking, well show you how to convert a regular layer into a layer mask.
[ALTERNATE LINK]
Part 5: Working with Flash 8 Masking - Editing a Layer Mask
In part 5 of Working with Flash 8 Masking, well show you how to edit an already existing layer mask.
[ALTERNATE LINK]
Subscribe to:
Posts (Atom)

