Wikipedia:Reference desk/Archives/Computing/2013 November 27

= November 27 =

To hire a programmer for a job
Hi there,

I am wondering if it is the right place to ask such a question or if such questions are allowed here. So I will try. A month ago I got a patent from USPTO office. It concerns a special mode of visual processing. It is a device, however I have never implemented it in practice. What I need is to prove (or disprove) that it can work in real time. The device should employ either a laptop (better) or a desktop with sufficient computer power. The modeling should involve some graphics, rather simple, and considerable amount of numerical integration. The first step will be computation of special functions. No high math will be needed since the computations will be based on well known recurrence formulas. They are elementary. Quite many iteration will be required and this is one of the major problems.

I do have considerable experience with programming in C# and about two years ago I tried to crack the problem. What I ran into was that the functions, I calculated, were missing some roots predicted by the theory. Also many years ago I tried to do similar calculation in Fortran IV with double precision on an ancient mainframe and I got good harmonics after many iterations. Unfortunately I had to abandon the project (of calculating everything myself) and now I want to hire a programmer to do the job.

I will have to try to estimate the time needed for the project more carefully but it seems to me 20 hours might be sufficient. I do not want to use MathLab for that. I want the functions calculated from scratch. The graphics I mentioned are for visualization and displaying intermediate results.

I live on Mountain Time. My first question is: what would be an hourly rate a competent person, perhaps a graduate student will charge me to do the job or, alternatively, how much should I offer? The second question is: how difficult is it to find such a person? One acquaintance scared me with his assertion that it would be extremely difficult. Sure my first thrust will be to find such individual locally.

Any suggestions will be welcome.

Thanks, 174.52.14.15 (talk) 00:43, 27 November 2013 (UTC)


 * Some thoughts:


 * 1) Fortran is still available, and not a bad choice for the math engine. I've used it myself recently for this purpose.  You might want to separate the graphics from the math engine, using different languages and maybe programmers for each.  Although Fortran can do graphics, too.  See the bottom of my home page for some examples of animations I created using Fortran.


 * 2) 20 hours seems absurdly low, to me, as it will probably take that long just to nail down the specs.


 * 3) You will probably have to offer a high rate for such a short project. StuRat (talk) 01:01, 27 November 2013 (UTC)

Thank you very much for the suggestions. It is already something. Could you give me your estimate in terms of the hours and the rate? Just rough ideas. Wow, I just checked your web page. It is very impressive.174.52.14.15 (talk) 01:08, 27 November 2013 (UTC)


 * Given the obscurity of the description, anybody sensible will estimate a 90% probability that your task is hopeless, and require $1000 up front to invest any time in it at all. You might be able to interest a grad student with good numerical analysis skills for $50/hr, but without any specific knowledge of the math you want it's completely impossible to say how many hours would be needed. Looie496 (talk) 01:11, 27 November 2013 (UTC)


 * Agreed. Full specs are needed to develop an estimate.  Also, you might offer a portion of any future profits instead of cash, if money is tight right now. StuRat (talk) 01:19, 27 November 2013 (UTC)

I can pay for the job, it is not a problem. $50.00 an hour is what I expected. I am learning as we go. Now is the question: how to write a spec. Well, it is numerical integration. One of the problems will be that the computations themselves might take an eternity, or at least hours and hours. I hope I won't be charged for that. What I would need is the time spent on specific tasks. Then somehow I will have to figure out if there exist faster computers that might accelerate the integration.

I can describe the whole project broken down in specific tasks. But first I would like to try to make a spec. Any references for me to see a few samples?

As I said I tried to crack the problem myself. What I did: I created a form (it is elementary in C#). It took me, I don't remember exactly how long but definitely not more than 8 hours, perhaps much less. Sure there were a bunch of buttons with some small windows for initial parameters, like indices L & M. Then a window for the argument. The program was rather short. Tomorrow I will open my source and will be able to tell exactly the number of lines. My goal was to calculate the special functions used in integration. I got weird function values. Apparently computational errors accumulated. I was tired at that time and just dropped it. I was discouraged. Lately I recalled my Fortran experience and thought that it was the way to go. The thing is, it is not what I do for a living. It is all rather complicated to explain. Also I want some independent mind with much broader computer experience to take a look at the problem. Even now with the hints you are dropping I am learning a lot. Thanks174.52.14.15 (talk) 02:24, 27 November 2013 (UTC)


 * The specs don't have to be very formal, just list what the program is supposed to do, as detailed as you can, and include any formulas you have developed. Does your patent application include any of that, or is it just for the hardware ?  As far as not paying for the programmer's time while a long batch job runs, yes, that could be a term of your contract.  However, you said you hope to get it to run real time, and this confuses me.  Do you mean it will initially take hours, but you hope to get it down to seconds ?  In that case, you need to do lots of benchmarking and code optimization, which is a different type of coding.  I've done some of that, too, and it takes many iterations, tweaking one thing at a time, then running your test cases again, to see if that tweak improves the speed. StuRat (talk) 03:34, 27 November 2013 (UTC)
 * A patent is supposed to provide enough information to make a working example. You should have got your idea working in C# or Basic or anything first even if very slowly using an inefficient method. If you can't get it working slowly there is no point talking about doing it fast. A programmer might be able to get it going fast using a better algorithm once you get it working satisfactorily but they're not going to do your work in devising a method in the first place. Dmcq (talk) 08:51, 27 November 2013 (UTC)


 * If I understand the OP correctly, the problem seems to be error stackup, which is caused by using too low of a precision in the calculations. If so, there are solutions to that.  Some languages support arbitrary-precision arithmetic calculations, for example.  Or, perhaps 32-bit or 64-bit precision would be enough.


 * However, you do have a point that the algorithm may not work. With this in mind, the contract should not specify that the programmer must provide working code, but only that they must implement the algorithm defined in the specs correctly.  Whether the formulae work or not is beyond their responsibility.


 * I once had a robotics professor derive the formulae for linear movement of robotics arms, without consulting any notes, in class, over several weeks. He then asked us to implement those formulae in code, and, no surprise, they didn't work.  So, it happens.  Even very smart people sometimes make mistakes.  Let's hope this is not one of those cases. StuRat (talk) 09:15, 27 November 2013 (UTC)


 * The problem is more likely to be caused by discretization, which especially comes into play in numerical integration. But when the OP starts talking about numerical integration and then suddenly is talking about roots, it's really impossible to figure out what sort of mathematics is involved here. Looie496 (talk) 16:36, 27 November 2013 (UTC)

Thank you very much for all contributions. I have to go to work now and will be back in about 12 hours. It is a very interesting discussion for me. Thanks, -Alex

Well, this is the scoop (partial though). Let's assume I have it under control. I will use masculine for simplicity. I've found a man who would agree to follow the script, we have a contract, etc. So, he writes software, he then runs the "program" and determines that the execution took let's say N minutes. What will follow is not a clear vision because I have so little experience in it, it is sort of granular. I will look into multiprocessor hardware. The task itself is highly linear and it is amenable to breaking up in much smaller and manageable parts. I will describe it later in the spec. Multiprocessing is mentioned in the patent. Dell manufactures a server with 96 processors. Perhaps that will be the answer. I can afford to buy it if needed. The further vision is to get a computer with perhaps 4096 processors. I've read somewhere that there is an experimental machine available with that many. But I need to run the task one single time to calculate roughly how many processors will be needed. Then another option still down the road is: provided everything points to it and financing is available I may approach Dell and ask them to make a computer with so many processors, perhaps 256 or whatnot, unencumbered with any I/O junk, pure calculator that will run the integrations I need. Sure some I/O will be needed but stripped down. And how about creating specialized hardware for at least part of the task, sort of special processors like video cards. Perhaps some of the subtasks could be hard wired solid, who knows.

Someone mentioned a possible optimization which I've also had in mind. One thing I expect to find out from the execution is to learn which part requires the largest effort and consumes most of the time. If it is calculations of the special functions (harmonics) then perhaps it would make sense to create a table (library) of needed values and take what you need every time. That will require a three-dimensional matrix though because you change two indices and an argument (angle). Hopefully it will cut down on execution time. Perhaps it can be kept in RAM. Then it will be super fast, or in case of ordering a new machine from Dell, a cash memory might be construed for that.

Another idea is to try to calculate those special functions only at key points and then use linear or quadratic interpolation to fill the gaps. In some areas they look like sine/cosine and perhaps those could be used instead. The only thing that will be needed is the table of all roots. The ideas here are plentiful. Thanks2601:7:7680:626:86D:846D:AD0B:96BD (talk) 01:44, 28 November 2013 (UTC)


 * Some more thoughts:


 * A) You mean cache memory, not cash.


 * B) "Highly linear" to me means sequential processing, where each step depends on the previous step. In this case, parallel processors won't help.


 * C) Having a custom computer architecture designed for you will cost a huge amount of money. If there's any way to use an off-the-shelf model instead, I recommend that.


 * D) A lookup table in memory will require more time up-front to load it into memory. Just reading the entries off the hard disk, as needed, will take longer per look-up.  Assuming they are properly indexed, though, that might still be quicker, if the number of items you need to look up per run is only a small portion of the total.  You might also consider a relational database for storing a large look-up table, as they offer several indexing options, which you can optimize for your situation.  (In your case a hierarchical database would also work, but relational databases have had a lot more work done on them to optimize efficiency, in recent years.)  StuRat (talk) 06:08, 28 November 2013 (UTC)

StuRat, thank you for the correction. Somehow I got carried away with the cache. Sorry, you are wrong about the linearity. You can read an article in Wikipedia "Linearity" which explains additivity of linear processes. It has nothing to do with being sequential. The process I try to describe is highly additive. In short instead of taking a surface integral over the whole area, partial integrals over smaller areas may be taken and the results then added. It will be the same. Unfortunately now I am not ready to write the spec. It is a bit complicated and I have to think it over, I was caught off guard with it. In order to write a spec I need to learn how to print formulas here in Wikipedia.org. I will need about 8 of them overall. I really appreciate your comments, though.

I promised to count the number of source code lines in the program I wrote in C# two or three years ago which calculated the harmonics but they were skewed. It was 1,800 which included comments, empty lines, etc. I don't recall how much time I spent but it was not more than 20, I guess.

You say that loading the table will take time, yes I agree but it can be done only once. Can it be hard-wired in RAM though? This is something I mentioned. Sure disk reading will defeat the whole thing. I am bit shaky on relational databases although I sure used then and still do in Sql Server.

I will definitely be back. Thank you very much. 2601:7:7680:626:86D:846D:AD0B:96BD (talk) 16:25, 28 November 2013 (UTC)Alex


 * This would be a very simple database implementation, just one table and one query. As far as "hard-wired into RAM", I think what you need is ROM.  See Read-only_memory and Read-only_memory.  Based on those discussions, it looks like storing the look-up table on ROM, then loading it into RAM, at the start of the program, might be the way to go, to avoid any need for slow hard disk reads.  StuRat (talk) 12:06, 29 November 2013 (UTC)


 * All of this discussion of implementation details is a waste of time if we don't have any information about the actual problem that needs to be solved. Looie496 (talk) 17:05, 29 November 2013 (UTC)

Set Mac OS X Leopard to wake up every two hours
Is there a way for me to make it such that my iMac running Mac OS X 10.5.8 wakes up every X hours? The system that is found in the "Energy Saver" panel is insufficient for this task. — Melab±1 &#9742; 06:27, 27 November 2013 (UTC)


 * I haven't used it, but this program says it can do scheduled wakeup calls . SemanticMantis (talk) 17:58, 27 November 2013 (UTC)


 * Is your iMac a PowerPC-based system? That could change subtle details about how power events get triggered.
 * Either way, you can use pmset to set and modify advanced schedules for power management events. For example:

pmset repeat wakeorpoweron MTWRFSU 12:00:00 wakeorpoweron MTWRFSU 14:00:00 wakeorpoweron MTWRFSU 16:00:00
 * ... will wake (or power on) the system every day, at 12:00, 2 PM, 4 PM, and so on, repeating forever.
 * Nimur (talk) 04:48, 28 November 2013 (UTC)

How Do I edit wikipedia using javascript on monobook.js
I want to make a javascript (user script) that automatically edits a page (without needing to press any buttons). This will be very helpful for tagging. I one day wish to make something similar to twinkle. But I need to start somewhere...Finally An Account (talk) 17:31, 27 November 2013 (UTC) How do I get https://en.wikipedia.org/wiki/Wikipedia:User_scripts/Guide to work.Finally An Account (talk) 18:24, 27 November 2013 (UTC)

Disabling resizable text areas on Firefox
There are certain pages that I use that Firefox will automatically shrink the text areas and then put a resizing button in the corner. Is there any way to suppress or disable that? All my searches just turn up help for website developers to suppress it on their site only, instead of a solution for the user. —Akrabbimtalk 19:12, 27 November 2013 (UTC)
 * Well if you can change it, it's probably in about:config (see this list of about:config entries). You're sure it's not caused by javascript on the page itself? Can you try visiting the page with javascript turned off, or give us a link to an example page? Card Zero  (talk) 20:11, 27 November 2013 (UTC)


 * Have you tested the page in another browser for comparison? I believe Firefox adds the resizing handle to all textareas (unless the page code says not to), but the textarea's starting size is specified by the page itself. So if you're annoyed that the textarea starts out too small, I believe that's caused by the way the page was coded and not caused by Firefox. The resizing handle lets you override the size if the page's default size is too small.


 * Firefox has a user style sheet that lets you modify every page you visit. This can be used to remove the resize handle, or change other aspects of webpages to your liking. Here's how to find it:


 * Go to the Help menu and choose Troubleshooting Information.
 * Find the line Profile Folder and click Show Folder.
 * Open the chrome folder.
 * Using a text editor, edit userContent.css or create it if it doesn't exist.
 * You can add the following line to disable the textarea resize handle:
 * Restart Firefox to see the change.
 * If you want to use styles that other people have made, you may be able to find add-ons that make the process easier. For example, I found userstyles.org recommends an add-on called Stylish, but I don't have any experience with that site or add-on.
 * If you want to make your own style rules, you can read up about CSS (Cascading Style Sheets), the language used.
 * --Bavi H (talk) 06:32, 28 November 2013 (UTC)
 * --Bavi H (talk) 06:32, 28 November 2013 (UTC)

DVD drive keeps on spinning
It just does it for no reason. I'm running Windows XP. Is there a command to stop it? Thanks for any help you can offer. Anna Frodesiak (talk) 22:05, 27 November 2013 (UTC)


 * I'm assuming there's no disk in it, which is just weird. Even so, there are some good suggestions here: if "power options" in the control panel is set to put hard drives to sleep, try turning that off; if you can locate a firmware update from the DVD drive's manufacturer's site, install that; do a thorough malware scan; then try turning off any anti-virus program to establish whether that's trying to access optical disks. Card Zero  (talk) 00:31, 28 November 2013 (UTC)


 * I'm so sorry. I neglected to say that it spins when a disk is in but not in use. The superuser site seems to be blocked here in China. I'll try the things you recommend. Many thanks. :) Anna Frodesiak (talk) 00:47, 28 November 2013 (UTC)