Wikipedia:Reference desk/Archives/Computing/2010 October 18
Computing desk | ||
---|---|---|
< October 17 | << Sep | October | Nov >> | October 19 > |
Welcome to the Wikipedia Computing Reference Desk Archives |
---|
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages. |
October 18
[edit]Besides the iPhone, what is considered by reviewers to be the most beautiful smartphone...
[edit]purely from a design perspective?--The Fat Man Who Never Came Back (talk) 01:41, 18 October 2010 (UTC)
- weird way to say it, but I think I know what you're trying to ask. probably the Xperia. 173.180.219.65 (talk) 02:33, 18 October 2010 (UTC)
- Hah, good luck with that. Beauty, it would seem, is in the eye of the beholder. Perhaps you are looking for simplicity in design, by way of small shape and sleek lines? Or screen quality? Or durability? Or versatility? What is beauty to you? --Jmeden2000 (talk) 20:30, 18 October 2010 (UTC)
- Personally, I think a computer should look like a PS/2 and a mobile telephone should look like an SCR-300. Current market trends do not seem to satisfy my aesthetic needs. What happened to all the buttons and knobs? Those were the hallmarks of quality and configurability. Nimur (talk) 22:38, 18 October 2010 (UTC)
- My xperia 10 is sexy like its owner... Sandman30s (talk) 07:45, 20 October 2010 (UTC)
trick gmail into thinking iphone is a computer
[edit]Hey, as you may know, gmail has a "fully" featured iPhone interface for gmail, but it doesn't contain a lot of the features from the desktop version (I'm mainly concerned with the "call phone" feature here), and although there is now a "desktop" view (button at the bottom of the page), it's still a simplified gmail with no google talk functionality. Safari is a fully functional browser with HTML5 support and all that, so it should be able to handle all the same feature that firefox can. Is there any way to trick gmail into thinking I'm not on an iPhone, i.e. by using a special URL or something? I have no reason to believe that google is actively blocking iPhone users from accessing the fully functional gmail interface, though I can't say I ever really know what google is thinking. Thanks! 173.180.219.65 (talk) 02:27, 18 October 2010 (UTC)
- Get a user agent switcher and make safari tell gmail that it's actually something else, like chrome or firefox. As for "call phone", this will not work, since the feature requires a browser plugin, which i don't believe exists for the iphone. 76.10.146.121 (talk) 06:09, 18 October 2010 (UTC)
- Call phone doesn't need a plugin, only the video feature does! BUT, I did find a user agent switcher (thank you!), and now it thinks I'm on Safari 5, and everything works BRILLIANTLY, BUT!!! call phone requires flash... doh! I think there is a way to get flash working for jb phones so I'll get to work on that. 173.180.219.65 (talk) 06:36, 18 October 2010 (UTC)
- I don't know what you mean by "jb phones", but the iPhone specifically doesn't support Flash. In fact, the notorious section 3.3.1 of the Apple developer agreement for the iPhone appeared to be a heavy-handed way to insure that Flash never made it onto the iPhone in any way. Paul (Stansifer) 12:16, 18 October 2010 (UTC)
- I guess that jb is the OP's shorthand for jailbroken. -- 78.43.71.155 (talk) 17:10, 18 October 2010 (UTC)
- Yes, and there are now multiple band-aid solutions to the flash problem, though none of them are able to display all modern flash apps (understandable, since they are basically emulators), and unfortunately gmail detects them as lower versions of flash, so no "call phone" feature for me, yet. 173.180.219.65 (talk) 02:42, 19 October 2010 (UTC)
- I guess that jb is the OP's shorthand for jailbroken. -- 78.43.71.155 (talk) 17:10, 18 October 2010 (UTC)
- I don't know what you mean by "jb phones", but the iPhone specifically doesn't support Flash. In fact, the notorious section 3.3.1 of the Apple developer agreement for the iPhone appeared to be a heavy-handed way to insure that Flash never made it onto the iPhone in any way. Paul (Stansifer) 12:16, 18 October 2010 (UTC)
- Call phone doesn't need a plugin, only the video feature does! BUT, I did find a user agent switcher (thank you!), and now it thinks I'm on Safari 5, and everything works BRILLIANTLY, BUT!!! call phone requires flash... doh! I think there is a way to get flash working for jb phones so I'll get to work on that. 173.180.219.65 (talk) 06:36, 18 October 2010 (UTC)
screen blanking app - multiple screens
[edit]I have a TV hooked up to my laptop in a dual monitor setup, and I'm wondering if there's a little taskbar app/shortcut setup that will allow me to selectively blank (make black) either one of the screens; effectively putting half of the screen into screensaver mode. Thanks! 173.180.219.65 (talk) 05:45, 18 October 2010 (UTC)
- Would you want to revert to a single monitor desktop, or just blank the screen and keep what's underneath?Chase me ladies, I'm the Cavalry (talk) 13:35, 18 October 2010 (UTC)
- Just the blanking yeah. Sometimes I do have stuff opened on the other screen, I just don't want it glowing while I'm watching a movie or something like that. Also, switching to one screen takes a few seconds (longer if the memory is being taxed!). 173.180.219.65 (talk) 02:46, 19 October 2010 (UTC)
Function pointer
[edit]- Moved from the language reference desk. JIP | Talk 07:34, 18 October 2010 (UTC)
Hello Friend,
Can anyone tell me ? What is the purpose of using pointer to function?
And void pointer function in C?
like void (*func)(int a, float b);
what is the difference between normal function and pointer function?
Regards, Antony Prabhu.M —Preceding unsigned comment added by 122.164.53.225 (talk) 05:00, 18 October 2010 (UTC)
- You'll have more luck asking this at the Computing reference desk. My intuition about this is that using a pointer to a function allows the function to be defined at runtime rather than explicitly in the code (similar to Python's lambda functions) but I am not an expert on this so you'd be better off asking one of the computer people. rʨanaɢ (talk) 05:20, 18 October 2010 (UTC)
- C does not allow the creation of functions at runtime. A pointer to a function is used for passing a pointer to an existing function as an argument to another function. A well-known example is the implementation of sort functions, such as quicksort (part of the standard library). Its prototype is
void qsort( void *buf, size_t num, size_t size, int (*compare)(const void *, const void *) );
- The last argument is a pointer to a function written by the user of the library, which specifies the sort-criterion to be used. In this example, the void* arguments of the compare function are pointers to the data elements that are to be compared, and void* buf is the start of the array to be sorted. A pointer to void in C is a "generic pointer", it can store an address to any data type, and will need to be converted a pointer to the correct data type before being used. Conversion is done using a typecast, or (in C, not in C++) implicitly in an assignment. --NorwegianBlue talk 06:13, 18 October 2010 (UTC)
C does not allow creating functions at runtime, but with function pointers, it allows switching between already created functions at runtime. You can define a variable of a function pointer type, and then assign any compile-time created function you want to this variable, as long as the signatures match. Calling this function pointer with the ()
operator then calls whatever function it is currently pointing to. JIP | Talk 12:02, 18 October 2010 (UTC)
VBA problem part 2
[edit]Hey, I want to move selected data from one table to another OnClick. The code that I'm trying to use at the moment is this but it's not working:
INSERT INTO Table![Merchant CCF] ([Customer Name], [Merchant Type], Partner, [Merchant Sector]) SELECT [Merchant Name], [Merchant Type], Partner, [Merchant Sector] FROM Table![Main Table]
Could someone perhaps let me know why it's wrong? Thanking you! PanydThe muffin is not subtle 12:54, 18 October 2010 (UTC)
Full code is :
Private Sub CmdAddRecord_Click()
On Error GoTo Err_CmdAddRecord_Click
DoCmd.GoToRecord , , acNewRec
'Prevent user warnings
DoCmd.SetWarnings False
Dim SQL As String
SQL = "INSERT INTO Table![Merchant CCF]([Customer Name], [Merchant Type], Partner, [Merchant Sector]) SELECT [Merchant Name], [Merchant Type], Partner, [Merchant Sector] FROM Table![Main Table]"
DoCmd.RunSQL SQL
'Allow user warnings
DoCmd.SetWarnings True
Exit_CmdAddRecord_Click:
Exit Sub
Err_CmdAddRecord_Click:
MsgBox Err.Description
Resume Exit_CmdAddRecord_Click
End Sub
PanydThe muffin is not subtle 13:12, 18 October 2010 (UTC)
- Are you getting an error message? Are you sure it is not actually working (modifying the table) and just not updating the form? If I recall, if you do SQL operations in Access/VBA you usually need to have the form manually refresh its recordset before it'll show the new data. --Mr.98 (talk) 13:26, 18 October 2010 (UTC)
- I'm not getting any error message at all but the table isn't updating either. It's very odd. PanydThe muffin is not subtle 13:27, 18 October 2010 (UTC)
- I thought as an alternative I'd try the following:
Private Sub Command83_Click()
Dim strSQL As String
Dim strCriteria As String
strSQL = ""
strSQL = strSQL & " INSERT INTO tblMerchant_CCF ([Merchant Name],[Merchant Type],[Partner],[Merchant Sector]),"
strSQL = strSQL & " SELECT ([Merchant Name],[Merchant Type],[Partner],[Merchant Sector]),"
strSQL = strSQL & " FROM tblMain_Table"
strSQL = strSQL & " WHERE (((tblMain_Table.ID) = me.ID AND ((tblMerchant_CCF.Test_ID) = me.Test_ID)))"
DoCmd.RunSQL strSQL
End Sub#
But I'm getting a run time error on that. Any ideas why? PanydThe muffin is not subtle 15:52, 18 October 2010 (UTC)
- There's a superfluous comma at the end of the first line after [Merchant Sector]). What's the error message? AndrewWTaylor (talk) 15:58, 18 October 2010 (UTC)
I fixed the commas but now it's saying: Compile Error: Method or Data Member not found. Eep! PanydThe muffin is not subtle 16:07, 18 October 2010 (UTC)- I've fixed the commas, I've fixed the errors with the data, now it's saying that it has a problem with the last line of code. At the moment it reads as follows:
Private Sub Command83_Click()
Dim strSQL As String
Dim strCriteria As String
strSQL = ""
strSQL = strSQL & " INSERT INTO Table![Merchant CCF]([Merchant Name],[Merchant Type],[Partner],[Merchant Sector])"
strSQL = strSQL & " SELECT ([Merchant Name],[Merchant Type],[Partner],[Merchant Sector])"
strSQL = strSQL & " FROM Table![Main table]"
strSQL = strSQL & " WHERE (((Table![Main table](ID)) IN ' & 1-5000 & ' AND ((Table![Merchant CCF](Test_ID)) IN ' & 1-5000 & ')));"
DoCmd.RunSQL (strSQL = [Yes])
End Sub
- I also tried the alternative
DoCmd.RunSQL strSQL
- No luck there either. PanydThe muffin is not subtle 10:27, 19 October 2010 (UTC)
- Once again, you really need to tell us the exact error message you're getting, not just "it has a problem with the last line of code" or "no luck". I don't have Access installed here so I can't try this out, but I believe the last line should be
DoCmd.RunSQL strSQL, False
- the second parameter indicates where the command is part of a SQL transaction, which I presume is not the case here. AndrewWTaylor (talk) 10:47, 19 October 2010 (UTC)- The error on the last line simply means that the SQL doesn't make sense (this error will always be vague). "DoCmd.RunSQL strSQL" should work if the SQL is good. I can see several issues with this SQL. First I'd suggest using the .dot syntax instead of the !bang. "Table![Main table](ID)" should probably just be "[Main table].ID". Second thing, "me.ID" is unlikely to mean anything within a SQL statement. It should probably be outside the string if it refers to the form. Third thing, "IN ' & 1-5000" probably translates as "IN -4999". I'm not sure if "BETWEEN" works in Access/VBA, but it's worth trying (BETWEEN 1 AND 5000). I'd suggest using the second example code, with the comma fixed, with the last line like, " WHERE ( (tblMain_Table.ID = " & me.ID & ") AND (tblMerchant_CCF.Test_ID = " & me.Test_ID & ") )"
- Once again, you really need to tell us the exact error message you're getting, not just "it has a problem with the last line of code" or "no luck". I don't have Access installed here so I can't try this out, but I believe the last line should be
- Having made the changes both of you suggested (and thank you very very much for your patience) I now get Error 3134, Syntax error in INSERT INTO statement. PanydThe muffin is not subtle 13:07, 19 October 2010 (UTC)
- I'd suggest posting the latest version. I'd also suggest, just before the "DoCmd.RunSQL strSQL" line, insert "MsgBox strSQL". A close look at the resulting SQL will probably reveal any errors. You can also get the SQL by adding a breakpoint (press F9) in the code editor at that point; run the code and when it breaks enter "?strSQL" into the "immediate window". -- zzuuzz (talk) 14:19, 19 October 2010 (UTC)
- This is the latest version:
- No luck there either. PanydThe muffin is not subtle 10:27, 19 October 2010 (UTC)
Private Sub Command83_Click()
Dim strSQL As String
Dim strCriteria As String
strSQL = ""
strSQL = strSQL & " INSERT INTO [Merchant CCF]([Merchant Name][Merchant Type][Partner][Merchant Sector])"
strSQL = strSQL & " SELECT ([Merchant Name][Merchant Type][Partner][Merchant Sector])"
strSQL = strSQL & " FROM [Main table]"
strSQL = strSQL & " WHERE ((([Main table](ID)) BETWEEN 1 AND 5000 AND (([Merchant CCF](Test_ID)) BETWEEN 1 AND 5000)));"
strSQL = strSQL & "MsgBox strSQL"
DoCmd.RunSQL strSQL, False
End Sub
PanydThe muffin is not subtle 14:31, 19 October 2010 (UTC)
- Modified (assuming all the field names are correct). Please note the changes:
...
strSQL = "INSERT INTO [Merchant CCF] ([Merchant Name], [Merchant Type], [Partner], [Merchant Sector])"
strSQL = strSQL & " SELECT ([Merchant Name], [Merchant Type], [Partner], [Merchant Sector])"
strSQL = strSQL & " FROM [Main table]"
strSQL = strSQL & " WHERE ( ([Main table].ID BETWEEN 1 AND 5000) AND ([Merchant CCF].Test_ID BETWEEN 1 AND 5000) )"
MsgBox strSQL
DoCmd.RunSQL strSQL
...
-- zzuuzz (talk) 14:39, 19 October 2010 (UTC)
- The SQL statement is invalid because the SELECT query only uses [Main table], but the WHERE clause also mentions [Merchant CCF]. If you delete
AND ([Merchant CCF].Test_ID BETWEEN 1 AND 5000)
then it should be OK. AndrewWTaylor (talk) 16:03, 19 October 2010 (UTC)- Is it possible for me to run more than one of these queries in a single module/button? If it is, how would I tell VBA that one query had ended and another one was going to begin? PanydThe muffin is not subtle 10:51, 22 October 2010 (UTC)
- The SQL statement is invalid because the SELECT query only uses [Main table], but the WHERE clause also mentions [Merchant CCF]. If you delete
SVG unique Id's
[edit]This should ba a relatively easy question to answer but I simply can't find the answer anywhere. I have given everything in my SVG file a unique ID and wish to reference the shape over and over, just changing its position. For example if I wish to recall the following.
<circle id="0_logo" cx="190" cy="405" r="10"
style="fill:#000000;stroke:#FFFFFF;stroke-width:2;fill-opacity:0.1;stroke-opacity:1;"/>
Is this similar to when you call, for example a gradient.
<circle fill="url(#grad)" cx="410" cy="285" r="30"/>
Thanks in advance :) 195.49.180.89 (talk) 13:03, 18 October 2010 (UTC)
- Don't worry - I eventually found it :)
<use xlink:href="#0_logo"/>
195.49.180.89 (talk) 13:53, 18 October 2010 (UTC)
I was considering full disk encryption (via TrueCrypt, on a Mac), and had some basic FAQ-style questions that I thought people might be able to help me with.
I know the upsides of FDE. But what are the practical downsides of full disk encryption? Is there a large performance hit? Where would the performance bottleneck be located (e.g. RAM, CPU, HDD access)?
If I went with FDE, how hard would it be to reverse if I decided that I didn't like it? Is it the sort of thing you can just say, "OK, disable it now," or would that require a whole lot of work?
Thanks in advance. --Mr.98 (talk) 13:23, 18 October 2010 (UTC)
- It depends a lot on your CPU which will be doing a lot more work (the bottleneck is in the CPU). Truecrypt encrypts everything prior to writing to disk, and decrypts when reading...so it will make your comp appear slower (cascading will make it even more slow). Truecrypt comes with a benchmark tool, so you can see what your speed will be. As for undoing it, its a fairly straightfoward procedure...just takes a while (however long it takes to encrypt your entire hardrive + whatever else you add)...you really need to see what the benchmark tells you. Just remember that with truecrypt, if you forget your pass or the MBT and your rescue disk breaks...you can't get your data back. Smallman12q (talk) 14:23, 18 October 2010 (UTC)
- I've found truecrypt on Windows to be essentially transparent. If you use AES, it's been optimized to the point that the CPU hit is far less than my disks seem to put through. I've never had an issue. I don't know about on mac, and it has had some "concerns" from some linux distros about its license, although that's given their somewhat different standards. Shadowjams (talk) 09:31, 19 October 2010 (UTC)
- As for undoing encryption, truecrypt does not support decrypt in place. (If you decide, that you do not want encryption, all data will have to be copied to unencrypted backup and orginal encrypted disk formatted (and data copied back)) -Yyy (talk) 09:58, 19 October 2010 (UTC)
- Actually I'm pretty sure it does for system disk encryption. On windows at least. Shadowjams (talk) 10:14, 19 October 2010 (UTC)
- As for undoing encryption, truecrypt does not support decrypt in place. (If you decide, that you do not want encryption, all data will have to be copied to unencrypted backup and orginal encrypted disk formatted (and data copied back)) -Yyy (talk) 09:58, 19 October 2010 (UTC)
MediaWiki api in C++ language
[edit]hello... i usually develop in c++ using Qt framework. i want to make a tool related to mediawiki\wikipedia which require interacting with API and a login to the system .however, i cant find any wrapper for mediawiki api in c++, and i dont know any web language like PHP java Actionscript etc. Does anyone know of somehing like this or even an example using cURL library --Umar1996 (talk) 15:22, 18 October 2010 (UTC)
- I can't find a C or C++ library that wraps the API, but all is not lost. The API is fundamentally an HTTP GET that passes what you want in the URL and spits the data back in a variety of formats. If you can't locate a library, it's not terribly hard to do what you want yourself. Essentially you can
- perform a query with an HTTP library, retrieving the contents of a URL like http://en.wikipedia.org/w/api.php?action=query&prop=revisions&titles=Area_51&rvprop=content&format=json
- parse the content with an XML or JSON library (e.g. json-glib, libjson)
- It's certainly more knuckledraggery than using a wrapper that abstracts this, but it should work. I'll have a check through the archives of http://lists.wikimedia.org/mailman/listinfo/mediawiki-api and see if anyone has done this already. -- Finlay McWalter ☻ Talk 16:06, 18 October 2010 (UTC)
Saving information from a html form
[edit]Can I update a text file or even a SQLite file with html alone? (it would be a local html page saving the information into a local file).--Quest09 (talk) 15:52, 18 October 2010 (UTC)
- Not really. HTML does not have the capability to save to a file by itself. For security reasons, JavaScript cannot open/save files. It can open/save cookies. You could install something like WAMP and then use a back-end scripting language to handle the file interface while HTML handles the user interface. That is rather common. -- kainaw™ 19:16, 18 October 2010 (UTC)
- On Windows, you can create HTML Applications which lift almost all security restrictions, and allow you to access filesystem objects and start processes through JavaScript. I've successfully used it to launch a few curl sessions and monitor their download progress by watching the download folder. To access SQLite, you would have to have it wrapped as an ActiveXObject Unilynx (talk) 22:34, 18 October 2010 (UTC)
- HTML is a markup language; it can't specify actions. However, it's possible to embed JavaScript and ActiveX and Flash into HTML, and the web browser viewing the page has the option of executing them. In order to affect "outside" things, it's necessary to disable security restrictions, as Unilynx said, which will make it possible (in IE on Windows at least; I don't think I've heard of other browsers having that option), but I suspect that it's awkward to do things this way. Paul (Stansifer) 11:42, 19 October 2010 (UTC)
- A HTML application is a bit different from normal HTML - it uses a .HTA extension instead of .HTML, and disables almost all restrictions by default - no restrictions to disable. But it indeed doesn't work outside of Windows or IE (although other browsers won't take over the HTA extension unless you ask them to, so anything deployed as a .HTA is quite likely to work on Windows, even if the default browser is changed.) Unilynx (talk) 15:57, 19 October 2010 (UTC)
PXR format, why still in Photoshop?
[edit]Curious, why would Photoshop support the PXR image format, when less than 300 of the Pixar Image Computer systems were ever sold? Why not make it just available through a plug in? -- Zanimum (talk) 19:46, 18 October 2010 (UTC)
- Aren't all Photoshop image format support via plugin? Nil Einne (talk) 20:04, 18 October 2010 (UTC)
- Okay well I checked in case Adobe changed things since the many years ago when I last looked and in CS4 I'm still right, all file formats are indeeded support via plugin including Pixar (pixar.8bi) Nil Einne (talk) 20:08, 18 October 2010 (UTC)
- Because Adobe never removes features from Photoshop. For example, if you go to Image --> Image Size..., there still is the "Nearest Neighbor" option within the drop-down list at the bottom of the dialog. Nearest Neighbor is less sophisticated than the other options in the list. But, it is great for expanding screen shots, because it simply enlarges pixels. Photoshop is used by creative professionals, who find creative ways to use old functions in Photoshop. There's usually two or three ways to do the same thing in PS, because of the retention of old ways of doing things.--Best Dog Ever (talk) 20:33, 18 October 2010 (UTC)
- Taking a guess at what Zanimium's question was... A perhaps useful thing to remember here is the feature was probably implemented in the late 80s. At a guess it wasn't that hard to get Adobe to add support for file formats in those days. Provide the code for the plugin and provided it's decent code and the format not patent encumbered Adobe may be willing to include that plugin as part of their official plugin code. (Of course it's also possible Adobe coded the support themselves.) Particularly if you're developing $120k machines in those days. (Remembering of course Adobe doesn't have a crystal ball, part of being a good company is predicting what your customers may want before they want it, and while it seems Pixar file format support wasn't that important it wasn't a bad guess from the info at the time it may be and anyway despite the limited success of the Pixar Image Computers, the format may have been important enough for whatever effort Adobe put in to it.) Heck, I don't actually know if it's that hard to get Adobe to support an image format nowadays.
- In terms of why they haven't removed the plugin, well other then what BDE has said, the code is very likely rather simple since the format is uncompressed (on x32 and x64 CS4 Windows the plugin is the second smallest after WBMP) so likely not that hard to port between platforms or versions. I don't know enough about the 8bi plugin format but it's even possible there's no effort needed.
- Also while I don't know that much about software development, from what I know in general in large organisations for a variety of reason, some bureaucracy may develop. So for people in Adobe removing any file format support may not be just a matter of doing it, even agreeing in a meeting may not be enough, perhaps someone will need to write a document explaining why they're removing it which needs to be passed up the chain. (The only real reason to remove the format may be KISS and security reasons but given the likely simplicity of the code, these probably don't matter much.)
- More to the point (and somewhat in line with what BCE said), the people who did use Pixar Image Computers were likely large organisations who would be important customers to Adobe, customers who don't like unexpected changes, and customers who may sometimes maintain legacy stuff long after they were largely obsoleted. So while it's possible no one would care if pxr was removed, it's possible someone will and finding out after you removed it would be a bad idea. Sure you could survey all your customers, or hunt down whoever has ever owned Pixar Image Computers and ask them but that's will likely annoy them and it's a lot of effort for something (maintaining the support) which as I've said, is probably very little effort. And of course some people who never had Pixar Image Computers may have used (or even use) the format, as I said a lot recently, who knows? (It may even be someone in Adobe.)
- P.S. I didn't notice the header of this question until now. A reminder it's always helpful to mention anything important in the actual signed question.
- Nil Einne (talk) 21:03, 18 October 2010 (UTC)
Other languages that can do COBOL business things
[edit]1) COBOL is an old language. What other languages can be used in place of COBOL (supersets of COBOL?), while still having good handling of dates and financial functions?
2) Is it really true or not that most serious business applications are still written in COBOL in the 21st century? Why? Even though COBOL may be a legacy language, why are not new programs written in something else? Thanks 92.15.28.219 (talk) 20:01, 18 October 2010 (UTC)
- What's a serious business application? Nil Einne (talk) 20:03, 18 October 2010 (UTC)
- The sort of things that merchant banks or insurers might do for internal use. I do not mean websites. 92.15.28.219 (talk) 21:02, 18 October 2010 (UTC)
- The largest businesses in the world typically have contracts with major software and technology services companies - like, for example, IBM. IBM writes most of its application code in the Java programming language. As mentioned earlier on this desk, Java is currently the most widely used business programming language ([according to many surveys). That means new business programs are written in Java. It is difficult to estimate the quantity of legacy systems that still run COBOL programs; I am suspicious of commonly-repeated, vague claims that 40-year-old software still runs unmodified. Some existing systems certainly do run COBOL; there are probably even new programs and modifications still being written in COBOL; but these are exceptions, not norms. Consider IBM Enterprise COBOL for z/OS - the objective of this current product is to help integrate COBOL systems in to (reasonable) modern platforms that use Java and XML. Other COBOL tools exist, and the market is not "small", but it is hardly the mainstream. Nimur (talk) 20:39, 18 October 2010 (UTC)
Although Nimur claims that Java is the most popular business language, the reference he/she cites in support of the assertion appears to be for any programming, not just business, and is therefore invalid. Whereas this http://www.cobolportal.com/developer/future.asp?bhcp=1 says that COBOL is the most popular for business applications. 92.15.28.219 (talk) 21:01, 18 October 2010 (UTC)
- I would think that most applications that would in ancient days of yore have been done in COBOL would nowadays make use of databases and languages such as SQL. Looie496 (talk) 21:02, 18 October 2010 (UTC)
- The link the argumentative OP cites is to a "survey taken of professional business and industry employers who are using COBOL in their information systems". Presumably if you surveyed "professional business and industry employers who are using JAVA blah blah blah" you'd get a completely different impression. --Tagishsimon (talk) 09:31, 19 October 2010 (UTC)
I think SQL does not have any financial functions, so it would not be much use. 92.15.28.219 (talk) 21:04, 18 October 2010 (UTC)
- It is true that there is a lot of COBOL code lying around: [1]. But, I think that those programs are mostly old apps. Hardly any new programs are written in COBOL. Many of the old COBOL programs in use aren't being updated or even patched. If you look on job web sites for COBOL positions, you won't find very many. Most job openings are for other technologies like Java and .NET. I haven't worked with Java much, but .NET contains quite a few financial and temporal functions and data types, making it popular with businesses.--Best Dog Ever (talk) 21:12, 18 October 2010 (UTC)
- Reading the article you linked to (aqnd ignoring the slight spin put on by the author) gives the opposite impression: eg 62% of organisations use COBOL, and it is the 2nd most popular language. 92.15.28.219 (talk) 21:27, 18 October 2010 (UTC)
- On CareerBuilder.com, you will find 550 jobs if you search for the term "COBOL." If you search for "Java," you will find 7,431 jobs. If you search for ".NET" you will find 3,179 jobs. If it's the second-most popular language, why is it the least in-demand language in the workforce? Employers must not need much COBOL to be written, either as patches or new programs. Although there are programs in use that were written in COBOL, there are not many new programs written in COBOL. That's the conclusion I come to after reading that article and looking on a job board. In the article I linked to, there is a chart at the bottom showing that only 58% of the companies that use COBOL are using it to develop new applications.--Best Dog Ever (talk) 22:32, 18 October 2010 (UTC)
- "Only" 58%! Thats over half of them! 92.15.28.219 (talk) 22:59, 18 October 2010 (UTC)
- If 62% use COBOL, and 58% are writing new COBOL applications, then at most only 6% of COBOL users are dropping it for something else. 92.24.191.1 (talk) 09:23, 19 October 2010 (UTC)
- Sorry what? If 62% of businesses use COBOL, and 58% of businesses that use COBOL (which was what BDE specified) are developing new applications with it that means 42% of businesses that use COBOL are dropping it (well either that or they are planning to use their current apps forever) and only ~36% of businesses are using COBOL for new applications. (If it helps, 100% of business that use COBOL, use COBOL. So 100% of businesses that use COBOL - 58% of businesses that use COBOL and are developing new applications = 42% of businesses that use COBOL and aren't developing new applications, presuming there's no inbetween like haven't decided or didn't answer.) I'm actually not sure where the 6% came at all since 62-58=4. Even if you are considering rounding, that would suggest the most is 5 (62.5-57.5). I do hope the COBOL developers for serious business applications are better at maths then COBOL supporters... Nil Einne (talk) 07:30, 20 October 2010 (UTC)
- 1-(58%/62%)=6%. If you were into financial calculations, you would understand that. Despite your spin, 58% is still more than half. 92.15.29.194 (talk) 19:52, 21 October 2010 (UTC)
- Sorry what? If 62% of businesses use COBOL, and 58% of businesses that use COBOL (which was what BDE specified) are developing new applications with it that means 42% of businesses that use COBOL are dropping it (well either that or they are planning to use their current apps forever) and only ~36% of businesses are using COBOL for new applications. (If it helps, 100% of business that use COBOL, use COBOL. So 100% of businesses that use COBOL - 58% of businesses that use COBOL and are developing new applications = 42% of businesses that use COBOL and aren't developing new applications, presuming there's no inbetween like haven't decided or didn't answer.) I'm actually not sure where the 6% came at all since 62-58=4. Even if you are considering rounding, that would suggest the most is 5 (62.5-57.5). I do hope the COBOL developers for serious business applications are better at maths then COBOL supporters... Nil Einne (talk) 07:30, 20 October 2010 (UTC)
- If 62% use COBOL, and 58% are writing new COBOL applications, then at most only 6% of COBOL users are dropping it for something else. 92.24.191.1 (talk) 09:23, 19 October 2010 (UTC)
- "Only" 58%! Thats over half of them! 92.15.28.219 (talk) 22:59, 18 October 2010 (UTC)
- On CareerBuilder.com, you will find 550 jobs if you search for the term "COBOL." If you search for "Java," you will find 7,431 jobs. If you search for ".NET" you will find 3,179 jobs. If it's the second-most popular language, why is it the least in-demand language in the workforce? Employers must not need much COBOL to be written, either as patches or new programs. Although there are programs in use that were written in COBOL, there are not many new programs written in COBOL. That's the conclusion I come to after reading that article and looking on a job board. In the article I linked to, there is a chart at the bottom showing that only 58% of the companies that use COBOL are using it to develop new applications.--Best Dog Ever (talk) 22:32, 18 October 2010 (UTC)
- Reading the article you linked to (aqnd ignoring the slight spin put on by the author) gives the opposite impression: eg 62% of organisations use COBOL, and it is the 2nd most popular language. 92.15.28.219 (talk) 21:27, 18 October 2010 (UTC)
- Considering the job market for COBOL (it took me seconds to find an ad for a contract Cobol/CICS developer position in France, among many others) I would say there is still plenty of need for development in Cobol. Though, I strongly suspect most of the roles are related to maintaining legacy code rather than developing completely new systems. Astronaut (talk) 21:17, 18 October 2010 (UTC)
- On CareerBuilder.com, you will find 550 jobs if you search for the term "COBOL." If you search for "Java," you will find 7,431 jobs. If you search for ".NET" you will find 3,179 jobs.--Best Dog Ever (talk) 22:32, 18 October 2010 (UTC)
Thanks for the answers to question 2). Are there any answers to question 1) please? 92.24.191.1 (talk) 09:25, 19 October 2010 (UTC)
- Why do you ask? You seem to have already made up your mind. You probably knew the answer to both long before asking about them here. Nimur and I both suggested some languages, but why would you listen when you already know everything about it?--Best Dog Ever (talk) 09:44, 19 October 2010 (UTC)
- I didn't know the answers - be pointless asking wouldnt it? Nobody has confirmed that SQL or Java include the similar date and financial functions that I assume COBOL has. People have seemingly just plugged their favourite language. I'm doubtful if a database language would have financial functions, but I do not know. 92.24.191.1 (talk) 10:49, 19 October 2010 (UTC)
- No-one buys into your assumption that such functions are a necessary precondition of the language being of use in financial software contexts. In short, you assume COBOL has some functionality and you assume that JAVA does not, and so you reject the clear and repeated answer to your question. Somewhat solipsistic. --Tagishsimon (talk) 10:53, 19 October 2010 (UTC)
- Surely having financial and date functions makes writing a financial application easier and quicker? I cannot imagine that anyone would prefer to use a language that did not have them. (I'll ignore the personal digs, and bow to your superior vocabulary). 92.24.191.1 (talk) 11:17, 19 October 2010 (UTC)
- Having special functions for specialised needs does of course make things easier. That's presumably why we find the ability to add libraries of such functions to JAVA. --Tagishsimon (talk) 11:21, 19 October 2010 (UTC)
- Surely having financial and date functions makes writing a financial application easier and quicker? I cannot imagine that anyone would prefer to use a language that did not have them. (I'll ignore the personal digs, and bow to your superior vocabulary). 92.24.191.1 (talk) 11:17, 19 October 2010 (UTC)
- No-one buys into your assumption that such functions are a necessary precondition of the language being of use in financial software contexts. In short, you assume COBOL has some functionality and you assume that JAVA does not, and so you reject the clear and repeated answer to your question. Somewhat solipsistic. --Tagishsimon (talk) 10:53, 19 October 2010 (UTC)
- I didn't know the answers - be pointless asking wouldnt it? Nobody has confirmed that SQL or Java include the similar date and financial functions that I assume COBOL has. People have seemingly just plugged their favourite language. I'm doubtful if a database language would have financial functions, but I do not know. 92.24.191.1 (talk) 10:49, 19 October 2010 (UTC)
- Yes. An answer to 1 is SQL and JAVA. All of the work I've known about or been associated with for financial institutions (e.g. Nomura, Goldmans & others) has used these two. You harp on about "lack of date and financial functions" as if entirely unaware that should there be need for functions unsupported in JAVA, these can and are added as class libraries. We can only answer the question so many times before we get bored with your rejection. --Tagishsimon (talk) 09:50, 19 October 2010 (UTC)
- I don't think mentioning it once counts as "harping on". 92.24.191.1 (talk) 10:53, 19 October 2010 (UTC)
- An anecdote: Because I am a good Cobol programmer, I have had three Cobol contracts in the last ten years. All three were with large organizations (two companies and the government). All three jobs were basically the same. They have a Cobol application that has been in place for decades and they want it rewritten in Java. So, I do a rough rewrite and then a team of Java developers come in and pretty up the thing. I see Cobol turning into the same type of language as Ada and Mumps. There will always be organizations using Ada (Air Force) and Mumps (VA), but use is shrinking, not growing. -- kainaw™ 12:22, 19 October 2010 (UTC)
- At various times throughout the discussion, I prepared a response, but decided not to submit, because I believe the OP does not want to hear reality and may be trying to spark a debate. But I can't hold back. Like Kainaw, I have seen wild COBOL in its native habitat - large organizations and the government, and seen the functions it provided being actively replaced by new, better software. Java provides extremely powerful, simple, and localizable, compatible time, date, and calendar functions. It supports all types of mathematical and financial calculations. And it is a modern language with an enormous reservoir of talent. Java is also compatible with all the gimmicky fad-technologies of the day - simply because more Java is being written today. But not all technology progress is a "fad." For example, the Java language also seamlessly provides the facilities of the internet protocol - something COBOL will struggle with, even in today's latest and greatest COBOL incarnations. The oft-repeated claim about "banks and insurance companies" who have mysterious vaults of System-360 machines from 1967 is a misrepresentation of reality. Large organizations like banks and insurance companies have lots of money to invest in the newest, latest, greatest hardware and software - and can afford the consultants, contractors, service-company affiliations, and in-house developers to upgrade their systems. Production data centers are more like a factory-floor than a cathedral crypt. Old and outdated cruft gets replaced, not worshipped. COBOL had its strengths, and still serves in some cases where a suitable alternative has not yet been feasible, but it is severely diminishing in importance as new languages like Java and .NET steal the big "business software" market. Probably most surprising to the OP is that most COBOL currently runs in a Java virtual machine - and probably on ia32/ia64 hardware on linux. (Because of virtual machine advances - it doesn't matter what platform/architecture your code targeted). Our article, enterprise software, might help you gain some contextual insights into what business software actually looks like in 2010. It is still quite different from ordinary application-programming, and some specialized hardware still exists, but there are very few shops that still seek to buy "mainframes" and run COBOL on them as if it were 1980. Nimur (talk) 14:59, 19 October 2010 (UTC)
- Finally, an answer to question 1). Don't know why you are imagining this "OP does not want to hear reality" nonsense. 92.29.117.157 (talk) 18:25, 19 October 2010 (UTC)
- There are possibly more things that can get you into trouble if you naively program in Java. Rounding and formatting are the two where I have seen most errors. Java is quite capable of doing these but if you take a "general purpose" Java programmer and give them a financial application to write then there is a fair chance they will trip up. Also one of the difficulties is that often new programs have to be wedged into old systems, which means reading fixed format records, etc. These again can be done in Java but they are the "bread and butter" of Cobol and seem a bit unnatural. For a completely new application you would probably use XML in Java, which is much more flexible than fixed format records but almost impossible to deal with in Cobol. The company I work for has written tactical new programs in Java, while our long term strategy is to move to a Java/XML/SOA environment. -- Q Chris (talk) 15:52, 19 October 2010 (UTC)
- At various times throughout the discussion, I prepared a response, but decided not to submit, because I believe the OP does not want to hear reality and may be trying to spark a debate. But I can't hold back. Like Kainaw, I have seen wild COBOL in its native habitat - large organizations and the government, and seen the functions it provided being actively replaced by new, better software. Java provides extremely powerful, simple, and localizable, compatible time, date, and calendar functions. It supports all types of mathematical and financial calculations. And it is a modern language with an enormous reservoir of talent. Java is also compatible with all the gimmicky fad-technologies of the day - simply because more Java is being written today. But not all technology progress is a "fad." For example, the Java language also seamlessly provides the facilities of the internet protocol - something COBOL will struggle with, even in today's latest and greatest COBOL incarnations. The oft-repeated claim about "banks and insurance companies" who have mysterious vaults of System-360 machines from 1967 is a misrepresentation of reality. Large organizations like banks and insurance companies have lots of money to invest in the newest, latest, greatest hardware and software - and can afford the consultants, contractors, service-company affiliations, and in-house developers to upgrade their systems. Production data centers are more like a factory-floor than a cathedral crypt. Old and outdated cruft gets replaced, not worshipped. COBOL had its strengths, and still serves in some cases where a suitable alternative has not yet been feasible, but it is severely diminishing in importance as new languages like Java and .NET steal the big "business software" market. Probably most surprising to the OP is that most COBOL currently runs in a Java virtual machine - and probably on ia32/ia64 hardware on linux. (Because of virtual machine advances - it doesn't matter what platform/architecture your code targeted). Our article, enterprise software, might help you gain some contextual insights into what business software actually looks like in 2010. It is still quite different from ordinary application-programming, and some specialized hardware still exists, but there are very few shops that still seek to buy "mainframes" and run COBOL on them as if it were 1980. Nimur (talk) 14:59, 19 October 2010 (UTC)
Toy language or game to teach Object-oriented programming?
[edit]I started amateur programming before any object-orientated languages were around, so the OO methodology is new unknown and confuising to me. I tried to learn it by reading a book about it, but it was heavy going and I gave up after a few pages. Is there any easy instructional language or game that would teach me about OO programming? I am happy to use things designed for kids. Thanks 92.15.28.219 (talk) 21:14, 18 October 2010 (UTC)
- Perhaps you will find this Object Oriented COBOL tutorial helpful? Nimur (talk) 21:19, 18 October 2010 (UTC)
- Joking aside, if you want to learn an object oriented language, there is no surrogate for Java. It is entirely free software - the specification and its implementation are both freely licensed (see OpenJDK); and there is also widespread commercial support in the form of service companies and commercial implementations of the language and its platform. Furthermore, the official Java Tutorial sequence is free and includes everything you need to know - from design paradigms to syntax to complete working code examples. The "Specialized Trails and Lessons" section has complete tutorials for a variety of the most common O.O. tasks - making a web program, making a graphical user interface, making a small game, and so on. Nimur (talk) 21:22, 18 October 2010 (UTC)
- No need to keep on plugging Java, thanks. In any case it is not the toy language or game I was asking about. 92.15.28.219 (talk) 21:30, 18 October 2010 (UTC)
- Joking aside, if you want to learn an object oriented language, there is no surrogate for Java. It is entirely free software - the specification and its implementation are both freely licensed (see OpenJDK); and there is also widespread commercial support in the form of service companies and commercial implementations of the language and its platform. Furthermore, the official Java Tutorial sequence is free and includes everything you need to know - from design paradigms to syntax to complete working code examples. The "Specialized Trails and Lessons" section has complete tutorials for a variety of the most common O.O. tasks - making a web program, making a graphical user interface, making a small game, and so on. Nimur (talk) 21:22, 18 October 2010 (UTC)
- This sounds exactly like Smalltalk. Smalltalk is simple and elegant and frequently thought of as a teaching language. It's not designed for kids, though it's sometimes used for teaching kids, and Squeak is much more brightly-colored and cheerful than, say . It's also truly object-oriented. Java and C++ are messy compromises (C++ was once famously described as being object-oriented in the sense that nailing four legs to a dog makes it an octopus) with huge specifications. Smalltalk is therefore much more pleasant to work in, at the expense of running slower. The main disadvantage is that if you ever have to sit down to write some Java and have to type out
for(i = 0; i < something.length(); i++) {
you will know what you're missing. However, knowing a programming language's weaknesses makes you a better programmer, so the fact that simple and elegant languages (Scheme, Smalltalk, and even C) are rarely used should not dissuade you from learning them. Paul (Stansifer) 03:11, 19 October 2010 (UTC)- I agree Squeak could be a good idea for this purpose. Like all early Smalltalks (as far as I know), it provides basically a wiki-like programming environment, and this is essentially where object orientation started.
- Of course there are various degrees to which a language may or may not be object oriented. You might want to try Lua (programming language). This is a minimalist language very close to the spirit of BASIC, so it is extremely easy to learn. Like Perl, Python and Ruby, it has a certain degree of object orientation which is built from hashes + syntactic sugar. The basic idea is that you can write
hash.field
forhash["field"]
and you can store functions and objects there just like a number or string. Then ifhash.field
contains a function that takes two arguments, you can invokehash.field(x,y)
. An object is simply such a hash that has a number of such functions. Since several objects typically form a "class" of objects/hashes that share basically the same functions, it is convenient to write the functions so that they can be shared, i.e.hash1.field
=hash2.field
. But typically the functions need to know which hash they belong to, so you pass that as the first argument:hash1.function(hash1, x, y)
. And because this occurs so often, there is an abbreviation for it:hash1:function(x,y)
=hash1.function(hash1, x, y)
. - I think this implementation-based approach to object orientation should be a lot easier for getting started. Once you have become accustomed to that, you can still read the religious, dogmatic accounts of object orientation and concentrate on the various sects with their different attitudes to inheritance. Hans Adler 07:56, 19 October 2010 (UTC)
- You might be interested in BlueJ. APL (talk) 04:27, 19 October 2010 (UTC)
What do people think of Etoys (programming language)? 92.24.191.1 (talk) 09:37, 19 October 2010 (UTC)
- I haven't programmed in Squeak/Etoys myself, but I know a few who have, and they spoke highly of it. You might also want to consider Alice, which I use to introduce some of my students to OO programming in first year, as it provides an easy interface and a quick, but fairly solid, introduction. A few of my students have also tried Game Maker before they arrive at uni, and I gave my son a shot at it - he seemed to enjoy it. I've only coded enough in it to help him out, which wasn't much, but it is OO and would probably do what you have in mind. - Bilby (talk) 09:49, 19 October 2010 (UTC)
Is Logo at all OO? 92.24.191.1 (talk) 11:07, 19 October 2010 (UTC)
- There are a few versions that are OO, from memory. Object Logo springs to mind, although I don't think it is still supported. I wrote my own OO-ish Logo interpreter some time ago, but it isn't really suited for anything but demos of how OO works. Interestingly, Etoys is pretty much Logo, so I'd lean towards that per your suggestion before. - Bilby (talk) 11:23, 19 October 2010 (UTC)