Today's Question:  What does your personal desk look like?        GIVE A SHOUT

SEARCH KEYWORD -- Explore



   Python – parallelizing CPU-bound tasks with multiprocessing

In a previous post on Python threads, I briefly mentioned that threads are unsuitable for CPU-bound tasks, and multiprocessing should be used instead. Here I want to demonstrate this with benchmark numbers, also showing that creating multiple processes in Python is just as simple as creating multiple threads. First, let’s pick a simple computation to use for the benchmarking. I don’t want it to be completely artificial, so I’ll use a dumbed-down version of factorization...

   Python,Multitasking,Multiprocessing,CPU bound     2012-01-17 11:38:22

  Communicating Between Widgets in a Rich Internet Application

As a part of our October Free Dojo Support initiative, we received the following question from Manu Subramanian about how to manage communication between distinct components in a rich internet application: We are building an application with dojo. It does have many inter connected interface parts. For example it does have a top bar with drop down buttons. The menu items opens tabs in a tab controller. In general we need to call functions from different widgets or there are many interconne...

   Internet application,Rick internet,Widget,comminucation     2012-03-16 10:49:36

  What is goroutine?

Casual Talk Golang is quite enjoyable to write, aside from the tedious if err != nil checks. One of the fundamental reasons for the joy is goroutine, a core feature of Golang. Understanding goroutines in detail is worthwhile, as they contribute significantly to the pleasure of working with Golang. So, let's talk about goroutines, hoping to provide some insights to the readers. TL;DR: We'll start by talking about assembling a computer, then delve into some concepts of the operating system, such ...

   EXPLANATION,GOLANG,GOROUTINE     2024-01-21 03:26:10

  In College, Working Hard to Learn High School Material

In June, Desiree Smith was graduated from Murry Bergtraum High. Her grades were in the 90s, she said, and she had passed the four state Regents exams. Since enrolling last month at LaGuardia Community College in Queens, Ms. Smith, 19, has come to realize that graduating from a New York City public high school is not the same as learning. She failed all three placement tests for LaGuardia and is now taking remediation in reading, writing and math. So are Nikita Thomas, ofBedford Stuyves...

   Education,College,High school,Material,Knowledge transfer     2011-10-24 11:51:39

  Tricks with Direct Memory Access in Java

Java was initially designed as a safe managed environment. Nevertheless, Java HotSpot VM contains a “backdoor” that provides a number of low-level operations to manipulate memory and threads directly. This backdoor – sun.misc.Unsafe â€“ is widely used by JDK itself in packages like java.nio or java.util.concurrent. It is hard to imagine a Java developer that uses this backdoor in any regular development because this API is extremely dangerous...

   Java,Directly memory access,Tricks,JVM     2012-02-13 05:31:19

  Python object creation sequence

[The Python version described in this article is 3.x] This article aims to explore the process of creating new objects in Python. As I explained in a previous article, object creation is just a special case of calling a callable. Consider this Python code: class Joe: pass j = Joe() What happens when j = Joe() is executed? Python sees it as a call to the callable Joe, and routes it to the internal function PyObject_Call, with Joe passed as the first argument. PyObject_Call looks at the ty...

   Python,Object creation     2012-04-16 15:03:55

  A Fun Approach To Creating More Successful Websites

As Web designers and developers, each project we work with has a unique set of goals and requirements. But one goal we have for all of our projects is that we want them to make an impression on people — we want the websites that we create to be memorable. A fun experience is often an enjoyable one and an enjoyable experience is usually a memorable one. Therefore, it stands to reason that one of the ways to create a memorable experience is to make it a fun experience. In this article,...

   Web design,Elements,UI,Success     2012-03-05 05:10:07

  Python Performance Tips, Part 1

To read the Zen of Python, type import this in your Python interpreter. A sharp reader new to Python will notice the word “interpreter”, and realize that Python is another scripting language. “It must be slow!” No question about it: Python program does not run as fast or efficiently as compiled languages. Even Python advocates will tell you performance is the area that Python is not good for. However, YouTube has proven Python is capable of serving 40 million videos...

   Python,Performance,Efficiency,Tips     2012-02-14 10:50:22

  Prototypes and Inheritance in JavaScript

Forget everything you know about object-oriented programming. Instead, I want you to think about race cars. Yes – race cars. Recently I was watching the 24 Hours of Le Mans –a popular racing event in France. The fastest cars in the race are the Le Mans Prototypes. Although these cars are built by car manufacturers like Audi and Peugeot, they are not cars you’ll see on the streets and highways of your home town. They are built exclusively for high-speed endurance ra...

   JavaScript,Prototype,Inheritance     2012-02-27 04:55:22

  Lessons Learned while Introducing a New Programming Language

I've used a lot of languages (professionally) over the years: (off the top of my head) Cold Fusion, HTML, Javascript, php, SQL, CSS, ASP(classic & .net), C#, Ruby, Flex, Java, & Clojure. Each language has pros and cons. Being a programmer, it's easiest to discuss the cons - and in general I believe it was best said:I hate all programming languages - Matt FoemmelI think it's important to start with this in mind. At some point you're going to hate what you're advocating, so imagine h...

   Experience,New language,Tips,Risk     2012-03-05 05:13:59