What causes PDF file size to increase when exporting from Illustrator?

Question: I have a simple ad that I built in Illustrator CC with one linked image. The file size of the AI file is 5.8MB, when I export to PDF (2001 with Printer Marks and Bleeds) the file size increases dramatically to 43.6MB! I have no idea why this is happening but it's been frustrating me ALL MORNING. I've never had this issue before when exporting to PDF. Can anyone please give me any tips!
Comment: The *linked* image isn't part of the AI file but is part of the PDF.
Comment: yes... because the file is no longer linked, its a part of the file. I'm not sure what the confusion is?
Comment: I also tried embedding the image into the document. This also gives me a crazy big file.
Comment: The linked file is only 1.2MB. I'm just trying to figure out why it increased the PDF file size so much.
Comment: That sounds like information that should have been included in the question :) The filesize of the linked image won't directly translate to the increase in filesize of the AI or PDF but that will depend on the PDF export settings etc. That does seem like a large jump in size for a 1MB image, it's not that unusual though.
Comment: Well it can jump quite much if a jpeg is re compressed as a zip file.
Answer: [I;m assuming "PDF (2001 with Printer Marks and Bleeds)" refers to PDFX/1-a standards]
Flattening and embedding of data.
When you save an AI file to PDFx standards artwork is expanded and flattened, removing all transparency, embedding any raster images, embedding fonts, or font subset, actually "baking in" any object transformations, expanding patterns, etc.
Basically what the PDFx options essentially do is "print" the file to a PDF. So the resulting PDF is built upon the actual output postscript data.
The difference is, in Illustrator, Adobe can use application code shortcuts. Each file doesn't need to contain every line of postscript to output the file.
This is kind of similar to the "linked image" issue. When you open a file in Illustrator, it can see the image, see the reference to the original and then go get that data for you to use. Whereas in the PDFx format that data must be included, not merely referenced.
So Illustrator can save files size by including 4 lines of code to describe a shape, it's points, it's transparency, fill, stroke, transformations etc. But that 4 lines of internal application data, may take 4,000 lines of postscript to draw on output.
In terms of print production, files size is never a concern. All print destined files will always be larger in terms of kb/mb, and I mean always. No one cares how large the file size is for print files. What is of concern is quality. And for the high quality necessary for printing, you'll just have to get used to much larger file sizes.
Answer: When you save to PDF in Illustrator uncheck all options, especially 'Create Acrobat layers..' , but keep 'optimize for fast web view'. Make sure you don't have additional art boards in the AI file that gets dragged into the PDF, so save with 'use art boards' and specify only your current art board or the ones meant for export.
on a side note:
If you have a linked file that you embed and then un-embed again, sometimes illustrator create huge files from those linked (image) files. Re-link the file to make sure this has not happened.
Comment: Thanks for the contribution and welcome to GraphicDesign! Let us know if you have any questions for how the site works
Answer: It's probably not down to the image. A linked 1MB image shouldn't blow up 40x times (unless you've turned image compression off entirely. If that's the case use ZIP compression).
Do you have a large amount of text in this print? Or some fancy vector effects? In short, Illustrator uses a 'short-hand' of sorts when storing text, or vector effects. When you save your .AI as a .PDF for print, those effects are converted to gradients and curves, and, with enough of them, can seriously increase your file size.
That being said, this could be caused by dozens of different issues. If you had a link to an image of the print we could give you a better answer.


How to make a point coordinate system for EV3

Question: I'm trying to make a internal coordinate system for an EV3 Python project I'm doing, but at a complete loss on how to do it. It needs to keep track of how it moves (with wheels) in an X, Y coordinate system. The space that the project operates in will only have the robot move in mainly X and Y directions.
Answer: What you're trying to accomplish is called Odometry, and fortunately it's a pretty common task in robotics so there's a lot of information available on how to do it. The short answer is, it's relatively easy to implement, but hard to make it work really well.
Let's make things simpler by deciding that the robot can only a) drive straight and b) turn 90 degrees. In other words, the robot reaches an x,y coordinate only by driving along the cardinal directions N, S, E, W. We can make this simplification to avoid having to use trigonometry.
Now we need some variables to keep track of a) where the robot is, and b) what direction it's facing.

Make a variable "orientation" to remember which direction the robot is facing. 1=N, 2=E, 3=S, 4=W, for example.
Make variables "X" and "Y" to remember the position. These can represent whatever units of length you want. Let's just say X and Y represent motor rotations, for simplicity.

When the robot moves straight, you should update the coordinates X or Y depending on which direction it is facing. For example, if the robot drives 3 rotations fwd:

If orientation==1 (North), increase Y by 3 (rotations).
If orientation==2 (East), increase X by 3
If orientation==3 (South), decrease Y by 3
If orientation==4 (West), decrease Y by 3.

When the robot turns 90 degrees, you should update the orientation variable accordingly. See my other post for how to rotate your robot a specific number of degrees. Assuming a clockwise rotation,

If orientation==1 (North), set orientation==2 (East).
If orientation==2 (East),  set orientation==3 (South).
If orientation==3 (South), set orientation==4 (West).
If orientation==4 (West),  set orientation==1 (North).

Assuming you always update your coordinates and orientation whenever you move, your robot should be able to (roughly) keep track of its position using this method. You can make it easier for yourself by putting the DriveStraight and Turn90 code into functions (MyBlocks, if you're using the standard Lego software). For example, the DriveStraight function/MyBlock should take the desired number of rotations, drive the robot that far, and update the global X/Y variables. Similar for Turn90. Then your entire program consists of DriveStraight and Turn90 blocks to move around, and at any time you can read the X,Y coordinate and orientation from your global variables.
One problem with this method is that for every movement your robot makes, error accumulates, until eventually its internal position is no longer accurate. The easiest way to account for this is to occasionally return to a known physical location - for example, a wall corner at 0,0 - and reset X,Y to 0,0 when it gets there. A lot of FLL robots use this technique - these robots have square edges and back themselves into corners to force themselves into a known absolute position/orientation.


Bitcoin Core lost coins

Question: i have lost a bit of coins using Bitcoin Core wallet.
I have send my coins from Bitcoin Core wallet to my address on Bitstamp(copy/paste,no mistake here) and on my Bitcoin Core wallet has said "sent" as allways...than my computer crashed and there was no way of fixing it other than format an re-install Windows. I know it was stupid not to have a backup of wallet, but it is too late for that. I tryed to find the transaction using the addres i have send to, but there is no transaction found.
I have no other info about my wallet, except a couple of addresses that i have generated on my Bitcoin Core wallet, when i was sending coins to my Bitcoin Core wallet.
Is there ANY way i can get my coins back?
And if not where are thay?
Will pay a finders fee :)
Comment: There's no way we can tell without the addresses involved or, at the very least, the timeline. Also, your description is vague everything. For example, you say "I tryed to find the transaction using the addres i have send to, but there is no transaction found" which doesn't tell us much because we have no idea what you tried.
Comment: Hi,thank you for responding...the addresi have send to is:3Bhe7JyMo5QyhHXMFveCNu9zJgVQbWkd5L i think it was on the 7.4..  i contacted bitstamp(where my reciving  wallet is),but thay said-  there have been no BTC sent to any of your BTC deposit addresses lately. In addition, there are no recent transactions broadcast on Blockchain. We would also kindly suggest you contact your wallet provider, as they should be able to assist you better.
Comment: Sorry it was on 6.4.
Comment: How long ago did you first attempt to send these coins? I do see transactions from January.
Comment: Hi, no i have send just once on 6.april 2017, and none of the block explorers can find it. I think my only chance i still have that i find the wallet data on my hard drive using using one of them recovery softwares. Do you know anything about that... what file am i looking for, and what to do with it,if i do find it? Thank you
Comment: You're looking for `wallet.dat`.
Answer:
Is there ANY way i can get my coins back?

No because you

don't have a backup
don't know the private key
don't have any recovery phrase (if applicable)
overwrote the disk
(though there was still a tiny chance of recovering a wallet.dat)

And if not where are thay?

They are in the blockchain but can never be used.

Bitcoin Core lost coins


Editing in Datasheet View

Question: I opened my list in datasheet view. But I wasn't able to edit in that view - things were read only. How do I enable edition in datasheet view?
Comment: Please describe a little more in details. Is your datasheet view disabled or do you get any errors when you try to open the list on a datasheet view.
Answer: Make sure you've configured the Datasheet section of Advanced Settings in List Settings. You should be able to edit the list in datasheet view, if the radio button is checked to "Yes" under "Allow items in this list to be edited using the datasheet and you have the correct permissions to modify the list.
Answer: In addition to what Kambridge has added you also need to ensure you have correctly installed Office 2007 Data Connectivity Component in the client system. This is used by the Datasheet view.
Answer: I had this issue.
Create a new data sheet 'view' and remove all system columns which are read only (created by, modified date, etc.).  I only have Name, Desc, and my custom meta columns.

Editing in Datasheet View


Is spaghetti and bechamel sauce an authentic Italian dish?

Question: I have seen instances where people mix white sauce / bechamel with spaghetti or macaroni but never seen a reputable chef to do so. This mix is sometimes mistaken for carbonara since its creamy white. Is it authentic to do so? If not can please also expound what béchamel usually used for for added information.
Comment: Ask Italians what's authentic and you'll get different answers from each.
Comment: Well I was hoping to know if the use of white sauce mixed with noodle type pasta is common among Italian. Maybe not common but is there any records of such dish?
Comment: What I'm trying to say is that there's no such thing as common in Italy when it comes to food. There's a huge variation in style from north to south, and traditions are different from town to town. However, I have traveled widely in Italy and I've never seen a white sauce with pasta other than lasagna.
Comment: If you search "pasta besciamella" you'll find dozens of recipes (in Italian). Most of it is for baked pasta but not all of it.
Comment: @GdD exactly what I meant. I have seen instances of white sauce mixed with noodle type pasta in my country (not italy or french) Also in non Italian youtube sources. This makes me question the authenticity of such dish then I came here if anyone can confirm. Aris answer is also interesting will look further.
Answer: In Italy, besciamella is usually only used on pasta when it's going to be cooked in the oven: pasta al gratin, pasta al forno, or as part of lasagne.
As for your question - is it authentic to just toss some pasta with it? I would use the same method I'd use to answer the infamous "is X a sandwich?" questions: if somebody asked for a plate of spaghetti at a restaurant and they came covered in besciamella, I think basically every Italian would be baffled. I've never seen it on a menu, never seen it on a table at anyone's place and never heard it discussed until I read this discussion, which makes me inclined to say it's not authentic. It could still be delicious though!
Comment: Yes I completely agree with you. I have seen pasta covered in bachiemela a couple of times even on youtube but never in Italy. They are attempting to make carbonara but dont like the idea of raw egg just tossed with pasta, so they try to make creamy sauce to mimic carbonara. Whats creamy? Milk. I highly disagree with such method.. but after sometime, hey! Isnt milk based sauce is basically bechamel? This inspired me to ask this question. It seems their action is not justified even after calling it bechamel.
Answer: I use it to make a slightly less rich 'carbonara-esque' sauce with pasta; bacon [or pancetta] onion, garlic. Make a roux round that, then milk, mushrooms, cheese, done.
I always considered it just a poor-man's carbonara - though it's fabulously tasty.
However, though it seems to have fallen in popularity under its original name, salsa colla, Béchamel actually originated in Tuscany & was later taken to France & renamed.
I'd say that gives us every moral right to put it on pasta & call it 'authentic Italian'.
Comment: Interesting reasoning. Though I have never come across a good source that state it is known for Italian to mix white sauce and noodle type pasta.
Answer: Traditional (authentic?) Lasagna is made with Bechamel sauce.
Anyway, what does authentic mean, and how long a food tradition makes something authentic.
For example, Pasta Grannies
Comment: I know. With the exception of lasagna is it authentic to just toss it with noodle type pasta?
Comment: As authentic goes. I am not very sure about the definition but this stack has food history tag. Since I am born in 2000, I would call something from 1980 or less as authentic lol.
Comment: one of the key tenets of traditional _lasagne alla bolognese_ is that besciamella is interleaved with _ragù_. There are tons of "white" variations without _ragù_, but they are ever more distant from a pasta dish, and definitely not related with spaghetti
Answer: I think the ground principle behind the use of bechamel can be worded by saying that it's used to keep things together (and wet!) and to have a surface that becomes crunchy and brown when you bake pasta (or other things, for instance, vegetables)


Does testing on Internet Explorer still make sense in 2021?

Question: It has been more than 6 years since Internet Explorer last received an upgrade from Microsoft. Is testing on IE still relevant as per the end-user point of view?
Comment: What are you expecting beyond the obvious "it is if enough of your users still access your services via IE"?
Comment: Does testing on WindowsXP still make sense in 2020?   July 2019, 2300 PCs within the UK NHS were still using it, and by extension, probably an older version of IE too. https://www.publictechnology.net/articles/news/nhs-still-running-2300-pcs-windows-xp
Comment: @Neil worse than that, some of the pages hosted by the NHS need to be run on IE. This includes the results page from the coronavirus testing
Comment: If you work on a project, the targetted supported browser and their version should have been defined.
Comment: Can you build infrastructure into the application to report what users are using?
Answer: It depends on your user base. Either check your statistics or do market research. W3schools shows that IE11 is still 0.4% of their population Netmarketshare says 5.5%.
I once had a client that used an older version of internet explorer on their terminal stations in their physical stores. We asked an extra yearly fee (100k dollars) to test the application versus this older version to motivate them to upgrade, but they were willing to pay.
Comment: How about 50% in summer government departments?
Comment: @BruceWayne I think 10% is high, but https://netmarketshare.com/browser-market-share.aspx says 5.5% which seems plausible.
Comment: @BruceWayne FWIW people who go to W3Schools are not that savvy. Savvy folks use better, more reliable resources.
Comment: @NielsvanReijmersdal most definitely higher. People who go to w3 schools generally are already more computer literate/savvy and are more likely to use chrome/firefox. I'd be amazed if the "true" percentage web-wide was under 10% of IE users.
Comment: The linked stat of 0.4% is just an example, it is a representation of the visitors of W3Schools. So the actual worldwide number is probably higher.
Comment: Are the statistics you linked to representative of a relevant user group?
Comment: How about 5% in internal customers using IE?
Comment: StatCounter, the other well known provider of browser stats puts IE at 2.3% of desktop browsers, and only 1.2% if you also factor in mobile browsers.  https://gs.statcounter.com/browser-market-share/desktop/worldwide/#monthly-201908-202008
Comment: We recently dropped support for IE. Whenever they use IE we recommend them switch to Chrome, Firefox, Edge or Safari
Answer: Older IE is still widely used in corporate networks since it has more integration with windows security and networking mechanisms as well as with ms office suite.
Big corporations often have large lag in new technologies adoption since they would need to test numerous corporate applications for compatibility with new browsers.
So I wouldn't exclude from testing at least for corporate applications.
Comment: *"Older IE is still widely used in corporate networks since it has more integration with windows security and networking **backdoor vulnerabilities** as well as with ms office suite."* FTFY.
Comment: This. We're developing for a big company, and they have tons of smaller companies using the end product. The big company itself is currently still in the process of switching their default browser away from IE, but since they've recommended IE use to all those smaller ones using their product their current stance with us is "we can't be sure what browsers the actual users will have, and we've always recommended IE. So the product still needs to support IE."
Answer: IE is (unfortunately) still around. It is not unusual for large government companies to have a deal with their hardware/software vendor that specifically mentions Microsoft products, including IE. They often require all their software to be compatible.
Government organizations, by inertion, will continue using IE until the contract runs out and they all get Linux machines with Firefox pre-installed. ;)
Comment: https://news.softpedia.com/news/German-Police-Wants-Linux-71320.shtml
Comment: @pavelsaman At the scale of most government supply contracts, the government can get whatever the hell they want on their computers. The issue is good support from hardware vendors for actually running Linux on their hardware and support from major applications for running on Linux (though that is getting better thanks to web apps). Windows gets used because it just _works_, not because it's the default offering for consumer retail sales of computer hardware.
Comment: Pretty much yes. There is some push now that the new edge browser is out and even the head honchos noticed here in Czech Republic, but the smaller town/village councils still use hand-me-downs consisting of phased out governmental hardware. There are still Windows XP computers and people wih internet explorer 7 connecting to our applications from small vilages - although that's single digit number of cases. And we're central europe.
Comment: Government organizations on Linux machines? There are a few ones, but you are mostly daydreaming.
Comment: Hopefully soon. But until HW vendors start delivering their end-user laptops/computers with Linux, this is far from reality. The default is still Windows, and only sometimes you can ask for like Ubuntu on Dell machines and perhaps some other exceptions.
Answer: As shown in the other answers, it really depends on your user base.
If you are targeting developers and high-end users, you probably won't have many (or any) using IE.
If you are targeting corporate or government environments, many may still be using IE (or obsolete versions of Chrome). Any update of the browser used by default on user's computers may break a number of proprietary applications which may not have been updated in years either, so they tend to stick with whatever works, because testing, upgrading, and all the dependencies that go with that is a lot of time (and money).
Anything in between (the public at large), you'll get a small percentage of IE users. The exact figure depends a lot on the target user base (country, age, revenue, tech-savviness...), so your best option is to measure it using your own stats/analytics. Once you have a figure, it's a business decision: is the revenue generated by that small portion of users larger than the cost of continuing to support IE and test on that platform?
Note that testing is really the tip of the iceberg here: the whole development process is affected by IE compatibility. In some environments maintaining support for IE can either be very costly, or very restrictive, or both (though IE11 is a lot better than some previous versions of IE were). So make sure the whole chain is involved. Unless you have business-specific reasons to support IE (as detailed above), you'll probably have the whole development team support you if you mention dropping support for IE!
Comment: We do a lot of work for large government-related healthcare organizations, with the NHS (the UK's national public healthcare service which is the 5th biggest employer in the world) being by far the biggest single organization, and all of our products need to work on IE. Few of our users work on computers without an alternative to IE, but a very large number of them use IE despite alternatives being available, simply because they're good at healthcare but don't really care about computers.
Answer: Until a few weeks ago I would have said "maybe", because people who are still using Windows 7 and don't want to install a non-Microsoft browser (for whatever reason) were stuck with IE11, and couldn't install Edge. They probably make up the bulk of the 0.4% IE users mentioned in another answer.
But recently Microsoft has created a new version of Edge that can be installed on Windows 7, and is actively telling IE users to switch, so the number of people who are stuck with IE will probably decrease even further.
Comment: Personal experience: I thought I would have moved over to Edge to stick with Internet Explorer. But upon seeing how different it was in user experience and to configure everything, I decided to move on to Firefox instead. Still using Internet Explorer when I want a native pop-up blocker that blocks everything without having to install an ad blocker though.
Answer: Microsoft bids farewell to Internet Explorer.
As per latest information from Microsoft, Microsoft To End Support For Its Ageing Browser Internet Explorer In 2021(News here).
But still most of the client required the Internet Explorer. Because they are still using the Older version due to some reason with security integration with Microsoft tools.
Answer: I believe the answer is to be found in this URL: XBAP Support in IE Edge:
As you can see, there are formats, supported by Internet Explorer, not being supported by Edge (Internet Explorer's replacement).
As long as there are such formats (I know about XBAP, I have no knowledge about other formats), Internet Exlorer must still be tested (unless, of course, you are legally sure that such formats will never be used).
Answer: Depends on your audience, but if you need stability, YES.
Real life example:
Last year(2019) I made a web application to be used by professors, I was later informed that they were unknowingly bypassing a validation and causing a bug (validation on the front-end, my mistake, granted), but wouldn't you know it. Not only were they using IE, they were using IE, but IE 11 didn't had this issue, I had to go down the history of IE, and I eventually found it, only IE6(2001) or older would make that bug happen, I made it compatible and the issue was gone.
Answer: As a Tester, you can surely deal with testing on IE 11. The decision is, however, not only up to you. Therefore, I'd try to find out what matters to other stakeholders:

marketing team might have certain opinions about what browser customers use
if the system is for internal users, the company might have some policies about what browsers their employees use (this would most likely be common knowledge for you and the development team from day one)
you can perhaps access logs and collect statistics about User-Agent header, and therefore decide based on some data about what browsers you'll use for testing
you can find global statistics like this one: https://www.w3counter.com/globalstats.php

Don't guess, ask other people who matter, collect data. Then see for yourself if testing on IE 11 makes sense in 2020 in your particular context.
Answer: As already said this really depends from your user base.
In our case - the requirement was to run it on both: desktop version and mobile/tablet version, since our customers also used our application on all these items we had to evaluate which browsers/mobile browsers they are using (e.g. Opera, Internet Explorer, Safari etc.).
So in our case we also made thoughts about considering Internet Explorer within our testing scope or not. Following points were important for us to make the decision whether we should consider IE within our testing scope or not:
Our customer -> More desktop or mobile related?

We asked our customers whether they are using the products via desktop and/or mobile version. This was very interesting for us because we also detected that customers with Apple Products were more willingly to pay for our products than Android users

Which browsers are mostly used for destkop/mobile versions?

Since we also were responsible for testing the versions within different countries we used Statcounter to find out, which browser was more used for e.g. the German market.

Source: Statcounter
So as you can see the used browser for the German market for IE is very low just 4,4%.
This leads also to the decision to concentrate more on Chrome, Firefox and Safari, less on Opera and IE.
At the end:
Since our customer weren't developers (or special users from the Government using Internet Explorer), we just made the focus on testing more on the most used browsers (Chrome, Firefox, Safari) and once when the customer is using Internet Explorer - which leads to our page - we just inserted a Pop-Up "You are using IE, this platform doesn't work with IE, please use e.g. xx browser".
Answer: And now, IE is removed from Window11 by MS, Lol
Comment: As long as the userbase of IE users remains high enough (and let's face it, if they aren't upgrading browsers, they probably aren't upgrading OS either) there's still a business case for testing it in many places.


Reaching a Linux server with a private IP without VPN

Question: I'm working on a network where I can't obtain a public IP address or set up VPN access. Is there a way that I can communicate with a local server remotely by using an intermediary in the cloud that both local server and remote client make an outbound requests to? If the local server would be making a request every few seconds to a public intermediary (EC2) to see if a remote client is waiting to speak with it, then the fact that it doesn't have a public IP wouldn't matter. At that point, I could also make a request from a client at a remote location and somehow ssh into the server through the public intermediary. This way both the client and server are initiating with an outbound request, which can originate from a private IP, without any modifications to either local network. Any bright ideas?
Comment: Congratulations, you just invented VPN!
Comment: @Silent-Bob Or ssh tunel :D
Answer: You could leave a reverse ssh tunnel open to this "cloud" endpoint.
Assuming that box A is your desktop, box P is the server with the private IP, and box C is the cloud server:
on P, open the tunnel:
P% ssh C -R 2200:localhost:22

Leave that session running.
To connect later from A:
A% ssh C
C% ssh localhost -p 2200
P%    # you're now logged into P

This only works as long as noone interrupts that first ssh session from P to C, but as long as they don't, it does work.
Comment: Use autossh to avoid losing the connection after inactivity or by other means
Comment: You can also use some sort of process monitoring to make sure that ssh remains running on P, say, with monit or Upstart.
Answer: I've done the "tunnel through an accessible server" plenty of times; but recently found much easier to just use IPv6.  Just install Miredo, (or activate Teredo on windows), and you got your own globally-accessible IPv6 address.  Since it's prone to change, set a dynamic DNS, and you're set.
Answer: You could try n2n from ntop to establish the connectivity without modifying the firewall.
Answer: The ssh solution posted by MadHatter is the easiest one, I think.  Also, depending on what you mean by "no VPN", you may be able to set up an OpenVPN client on the machine with the private IP, and OpenVPN server on the intermediary.  OpenVPN client will present with just outgoing UDP traffic to the intermediary, but you should be able to go to the intermediary and have full access to the private machine across the tunnel.  For that matter, with the right OpenVPN server configuration on the intermediary, your remote workstation can be configured as another OpenVPN client, and you can just connect to the server and see the private machine transparently.


Are we replacing, or augmenting the mods with this election?

Question: So perhaps this is a dumb question (wouldn't be the first time), but I guess I was under the impression that the mods we're in the process of electing would be augmenting those that we already have, not replacing them. Is that not the case? I was thinking about running, but not if it means potentially bumping one of the folks we have now, who are doing a great job...
Answer: This site, a post from Jeff, answers it as thus:

However, in the spirit of fairness and
  representative democracy, pro tem
  moderators must run for election if
  they wish to continue on as community
  moderators.
Answer: It's replacing. It's a feature of the Stack site to vote in moderators annually. Our little site is still small, so the available slots are small, but this will grow in time. However, by all means run. I think you'll find that the existing mods will welcome that, though I too agree with your assessment.
Comment: I for one, agree with Joanne. I won't speak for the others, but as a current moderator I welcome others to run. I enjoy being able to help run the site, but if the community felt that someone else would do a better job or was more deserving in some way, I'm all for that.  As long as the community is in good hands I'll be happy. :)
Comment: Thanks for your thoughts. Personally I don't feel especially qualified to be a moderator, but maybe at some point down the line I'll feel differently...


Multiple style sheets best practice

Question: I currently am working on a project which has one large style sheet for about 20 pages. The style sheet contains some styles which are specific for certain pages. I'd like to break the style sheet up so there is one style sheet for each page with one master style sheet that handles everything generic. The reason I want to do this is so people can work on multiple pages without having to worry about who has that large style sheet checked out (I'm using TFS). Is this good practice?
Comment: Sounds to me like you need to read up the *Cascading* bit of [css](http://en.wikipedia.org/wiki/Cascading_Style_Sheets). *8')
Answer: I'm not too experienced with this but in my opinion it really depends on your project and if it makes sense to do so.
It seems to me that in your case, with multiple people working on it, it would make sense but only if they really need to have access to the style sheet. The point of having a central style sheet is to keep the style consistent throughout each page. In projects I have worked on, the styling is usually predetermined or tuned up after the pages have been built.
If one page has just one element that needs to be customized, then I would just say use inline css to do so, since its really a special case. However if it gets to the point where a lot of items on that page need to be customized, then I'd say make a stylesheet for that page.
If the pages really differ enough to warrant each one having it's own style sheet in addition to the master style sheet then do so. But you should set a clear guide as to what the master style sheet should handle and make sure the individual style sheets don't conflict unless its truly necessary.
Comment: Like mentioned by gorjuce below, keep in mind scalability. If the project is going to be growing large, it may end up being a hassle to maintain the extra css files. In that case it may just make more sense to have one main one and use inline css to overwrite when needed.
Answer: You will absolutely lose 100+ hours fiddling with CSS if you split all your files up into a master, and a .css file for each page.
Use one stylesheet if possible. Assuming your master file will contain mostly resets, and CSS sanity checks, this will not be changing much. You need to use a nice set of comments to break up this one CSS file into distinguishable and labelled sections for your website.
I am not familiar with TFS, but if you are having check in/out problems, get people to branch the file and merge back? They will be working on their own seperate areas?
Answer: thinks scalability. Will you use your css later ? In an other project ?
What will the result if i've a MVC application and my view requests me many files not delivred ?
In my opinion, define a css for a specific module + some main where basic html, body, h1, p, span , can be defined

Multiple style sheets best practice


Is Back EMF relevant in dynamos, where there is electric generation?

Question: While doing some research about dynamos, I came across a situation wherein there was a question about the validity of my dynamo design. The counter to the design I suggested was that there would be back EMF generated by the design, but the design I have under consideration is that of a dynamo, where we generate electricity. I understand Back EMF is used in cases of motors, and not dynamos, is this the correct picture? The design of the dynamo is briefly described as follows: an outer rotating magnet that has a groove in which a fixed stator can fit in closely, of course, there is an air gap, and so on, as with standard dynamo design, but I did not see how anything like Back EMF, could really destroy the design under consideration, is this the correct?
Comment: Is it being suggested that the current being generated will create a field opposing the generating field?
Answer: There is a back-emf even in dynamos that can be considered. A perfect dynamo will produce a terminal voltage related to the speed that it was spinning and this also is the same for an imperfect dynamo.
However, under load, the imperfect dynamo has an extra factor to take into consideration; sure, as the electrical load increases, the dynamo shaft is harder to keep turning at the same speed (conservation of energy) but the current taken from the dynamo also flows through a few percent of copper wire turns that are not generating a voltage - this is called leakage inductance (also applies to transformer windings) and the current will produce a back-emf in those turns that reduces the forward emf due to the perfect dynamo effect.
Maybe this is what the OP is considering?
Answer: Whenever there is a field is built up in a coil, it eventually has to collapse.  This collapse results in the magnetic field being converted to "power".  This "power' will flow into every conductor connected to the coil.  Diodes are typically used to block this "power" from going where it shouldn't.  Read up on inductors.  There are well documented ways of dealing with the issues you appear to have.  Also, I am blind to the design you speak of, as I cannot see it.
Answer: In a dynamo it's not called "back EMF" - just EMF!
It's the same thing; but that's the whole point of a dynamo...
To expand on this a little : any machine rotating a coil in a magnetic field will act as a voltage source across that coil, and that voltage is dependent on the speed. (Also on the magnetic field and the construction, number of turns on the coil etc, but the speed is easiest to vary).
Now imagine there is also a voltage on the machine's terminals, and consider the current flowing between these voltage sources. This current will be the difference between the two voltages, divided by the coil's resistance.
If the external voltage is greater, the current flows into the machine Then we call it a motor. Current times voltage dropped across the resistance is wasted heat; current times "back EMF" is work done by the motor.
If the external voltage is less, then current flows out of the machine, and we call it a generator. Now current times "back EMF" is work done by you turning the shaft, and again that dropped across the resistance is wasted heat. The rest (current * external voltage) is the power output of the generator.
Comment: exactly what the thought was, why would a dynamo have back EMF apart from inductance losses?


AppEngine allocateIdRange : clarification about CONTENTION state

Question: I'm copying entities from one kind to another, and want to map their long ids in a predictable way.  After the mapping is over, I want auto-generation of ids to kick in.
To protect the entities I copy, I want to use allocateIdRange and manually allocate each id as I copy it.  My hope is that this will cause the datastore to protect these new ids, and only assign other ids to new entities created after the copy.
One return code has me worried: CONTENTION

Indicates the given KeyRange is empty but the datastore's automatic ID
  allocator may assign new entities keys in this range. However it is
  safe to manually assign Keys in this range if either of the following
  is true:

No other request will insert entities with the same kind and
  parent as the given KeyRange until all entities with manually assigned
  keys from this range have been written.
Overwriting entities written by other requests with the same kind and parent as the given KeyRange is acceptable.

Number 2 is out for me.  It is not acceptable for these entities to be overwritten.
Number 1 I think is acceptable, but the wording is scary enough that I want to make sure.  If I allocate 5 ids, from 100 to 104, and I get CONTENTION back, this seems to indicate that the entities I copy MAY be overwritten with new entities with automatic ids in the future.  BUT, if I hurry up and write my own entities with ids manually set to 100, 101, 102, 103, and 104, I will be safe and new entities with automatic ids will NOT receive these ids.
I'm worried because I don't understand how this would work.  I don't think of the id allocator as paying attention to what gets written.
TL;DR
Imagine the following scenario:
allocateIdRange(100, 104); // returns CONTENTION
putEntityWithManualId(100);
putEntityWithManualId(101);
putEntityWithManualId(102);
putEntityWithManualId(103);
putEntityWithManualId(104);
// all puts succeed

now, when, later, I call
putNewEntityWithAutomaticId();

is there any risk that the automatic id will be 100, 101, 102, 103, or 104?
Answer: The documentation follows as bellow:

The datastore's automatic ID allocator will not assign a key to a new entity that will overwrite an existing entity, so once the range is populated there will no longer be any contention.

Thus, you don't need to worry that your newly copied entities will be overwritten.


What is the joke with the title "Homo with a Pie" on Will & Grace?

Question: In the Will & Grace episode "Who's Sorry Now", Will says that he wants to title his autobiography "Homo with a Pie". The studio audience laughs at this, but I didn't get the joke. I assume it is a play on words that is referring to a title I'm not familiar with. Can someone explain the joke?
Answer: Here is what I pulled directly from the episode for context:

Grace: I found all the letters we wrote to each other in college.
Will: You know I meant to organize those for the archive for when I was going to write my memoir.
Grace: Oh, right, right, and it had that weird title.
Will: Weird title? "Homo with a Pie." is a great title!
< audience laughter >
Will: And when I get around to writing it, it's, it's, gunna delve into the complexities of the gay experience in America. And at the end, there'll be recipes.
< audience laughter >
Will: You know ... for pie.

There's two things here. First, this is just a laugh line, set there to pull an audience reaction. Second, (IMHO) it's really not that funny, yet the audience laughs anyway. I'm not really sure if studios use laugh signs (signs to tell the audience when to laugh) or not, but it sure seems like one of those times.
The only thing about this which is a joke is the play on him being gay. Calling himself a "Homo" comes from what was acceptable language in the time frame when he was planning his memoir, which was the early to mid 90's. I'm not quite sure the word has the same audience it once had (who will tolerate its use) then it did back then, thus why people might laugh at the joke.
Comment: You may be right, but I _still_ get the feeling it's referencing a title of something.
Answer: I believe this joke is supposed to be a vague reference to the book Catcher in the Rye by J.D. Salinger. It's a book that, at one time, was read extensively by adolescent students since it centers around rebellion and teenage angst.
From the site Culture Trip

The Catcher in the Rye follows sixteen year old Holden Caulfield after his expulsion from an elite prep school. The narrator is an insightful, if somewhat unreliable, character who uses casual expletives and tales of sexual fantasy to expound on the points of loyalty, 'phonies' and his own duplicity. To this day the book remains the prime example of adolescent isolation and alienation and has exceeded sales of over ten million worldwide.


What is the process for filing a continuation-in-part?

Question: I need someone to provide me with a detailed explanation for the process for filing a continuation in part within one year of originally filing for a patent. I know you pay the same fees as you did for the original patent... but what's the procedure - do you use the same forms, submit the same way... etc?
Answer: The MPEP contains the rules governing a continuation-in-part. Refer to Section 201.08   Continuation-in-Part Application [R-11.2013]. What differentiates a Continuation from a Continuation-in-Part is the inclusion of Paragraph 2.06: Possible Status as Continuation-in-Part. This is an indication that your Continuing Patent Application contains information not disclosed in the original patent. If the paragraph is not present but necessary, you may end up with additional Office Actions to resolve the problem.
I haven't yet had to file a Continuation-in-Part, but from what I can discern from the MPEP, this is the same procedure as a normal Continuing Application, just with the addition of Paragraph 2.06.
Please note that there are some additional considerations for a Continuation-in-Part since the America Invents Act went into effect. Adding new subject matter at this point can weaken a patent. For instance, consider what this might do to your Priority Date.


Literature Request: how does the house quality distribution change endogenously over time?

Question: Is there existing literature on how the distribution of housing quality changes with time? For example, literature saying "using 2000 as a baseline distribution $X$, the housing quality distribution is $1.2X$ in years when GDP is rising and $0.8X$ in years when GDP is decreasing." This is of course very naive, but hopefully it gets my point across. Perhaps housing price distribution could be used as a proxy for house quality, as there may not be data on the latter.
Answer: A paper of interest but it is mostly about trend changes in quality and not business cycle fluctuations:

This paper employs a new national data set to estimate constant
  quality dwelling prices for four regions of the country. The data set,
  collected by the National Association of Realtors, provides sale
  prices, locations, and characteristics of 5581 dwellings sold during
  the years 1986–1992 inclusive. The paper provides the first national
  hedonic analysis based upon transaction prices of sample dwellings.
  The estimated equation implies that more than half of dwelling price
  increases during the period resulted from quality improvements in
  dwellings.

New Hedonic Estimates of Regional Constant Quality House Prices (Millsa and Simenauerb (1996))
Because housing is a long lived asset and it is somewhat unusual to significantly change the size of a house after it is built we could explore your question with the quantity and quality of new housing, assuming existing housing is largely unchanged. The US Census's New Residential Construction Survey has rich information about new housing. For example, on Characteristics of New Single-Family Houses Sold one can see many attributes of new houses including size, bedrooms, bathrooms, number sold, and much more. The Median and Average Square Feet of Floor Area in New Single-Family Houses Sold by Location table goes back annually to 1978. So you could compare it with RGDP per capita to get an idea of how this varies with wages.


Deleting really exact duplicates

Question: There has just been a post which was repeated almost immediately due to a user account issue. In general, we've agreed not to delete or merge duplicate questions, but in this case the two versions don't add anything at all (I think). Would a bit of moderator 'cleaning up' be appropriate here?
Comment: @Caramdir: It wasn't half an hour ago! I've already done the merge on the two user IDs.
Comment: Mind you, deletes aren't forever, so we could just delete it and see if anyone complains!
Comment: sure, in this case there is no point in having both questions. Btw, its the same user id for both questions, so i don't understand what the problem was.
Comment: ok, didn't know that you could do that (because otherwise I would have suggested merging the other way so that the user stays in control of the question).
Comment: Seems a clear-cut case to me.  But I recommend waiting 24hrs just to see if anyone stops by with a killer argument for keeping it.
Comment: @Caramdir: The merge went the way it did as the first ID was 'unregistered' and the second was 'registered'. So the decision on direction was really made for me! As I understand it, the resulting single user ID should end up in charge of any questions which were written using either of the original ones.
Comment: @joseph: i meant that the questions, i.e. that the first question should be closed and not the second one. But since you merged the users it doesn't matter which question is kept.
Comment: @Caramdir: My working assumption was that it made logical sense to a) merge the users and b) keep the 'parent' question if possible. I may of course be wrong.
Comment: No, you are right. May comment was just about the hypothetical case that merging of users is impossible.
Answer: Okay, it seems like the best answer here is:

Flag up that one of the questions will be deleted
Wait 24 hours for any objections
Actually do the deleting

Deleting really exact duplicates


Plain text attachment ends up in base64

Question: From my Android app, I'm trying to allow the user to send an email with an atachment. The attachment is a plain text file. I want the user to be able to select only email-apps to send this email.
This is the code I'm using:
Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND);
emailIntent.setType("message/rfc822");
emailIntent.putExtra(Intent.EXTRA_SUBJECT,  "Some awesome email");
emailIntent.putExtra(Intent.EXTRA_TEXT, "Check out the attachment!");
emailIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse("file://" + file.getAbsolutePath()));
listActivity.startActivity(Intent.createChooser(emailIntent, "Send email with...");

Only email apps are shown, so far so good. When I use gmail to send the email, the email arrives as it should, atachment and all.
BUT, when I use k9 mail to send the email, the attachment ends up being encoded in base64. So basically, it's unreadable.
When I use
emailIntent.setType("text/plain");

the attachment arrives fine (in plain text), but the choose-app-dialog contains non-email apps.
How can I get the best of both worlds? Only email apps in the choose-app-dialog and text file attachments that arrive in plain text no matter which email client is used?
Answer: Intent.createChooser() gives you back a regular Intent. Just modify the Intent that you get back. Something like this:
Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND);
emailIntent.setType("message/rfc822");
emailIntent.putExtra(Intent.EXTRA_SUBJECT,  "Some awesome email");
emailIntent.putExtra(Intent.EXTRA_TEXT, "Check out the attachment!");
emailIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse("file://" + file.getAbsolutePath()));
Intent intent = Intent.createChooser(emailIntent, "Send email with...");
intent.setType("text/plain");
listActivity.startActivity(intent);

Comment: I get an ActivityNotFoundException if I try this ("No activity found to handle Intent")

Plain text attachment ends up in base64


How can I get involved with open source game projects?

Question: I have a limited experience in game development and would like to get involved with open source game project.  Where should I look and how should I begin?
Comment: I wanted to ask the question some time ago, great I find it already has been asked :)
Comment: fyi [here is a "top 5" list of open source game projects](http://apcmag.com/top_5_best_free_open_source_games.htm) (from 2008)
Answer: Without referring to any of my previous projects, I can say that I've been involved with a great deal of open source activities, game-related and otherwise, and by and large I have thoroughly enjoyed the ride. Right now I'm a manager with the jMonkeyEngine project. I'll be glad to type up somewhat of an 'introduction to open source games', but bear in mind this will by no means be an exhaustive list of resources.
I highly recommend checking out similar pages for all of the links I provide.
Free, open source etc. - The subtle differences
It's worth merely noting that there are some differences to terms like 'free' (vs 'gratis'), 'open source', and 'free software'. The GNU project has a good but somewhat one-sided take on it, titled Open Source Misses The Point. Simply put though, I'd say the most damaging misconception about open source is that you're not supposed to make any money off of it.
Point is, even if you're giving away your code as well as your art assets (though copyrighted art assets could be a good way to make an essential part of your game proprietary, without really damaging its technical 'openness') for free, that doesn't mean you can't commercialize other parts of your project.
There's another gamedev thread here that'll hopefully bring in many good ideas on how to commercialize a free game.
Independent preparation
If you want to sharpen your talents before getting involved with a group of fellow developers, 'try make your own game' is a no-brainer, and there's no shortage of open source engines (see devmaster.net/engines and wikipedia.org/wiki/List_of_game_engines). If you're looking for a little motivational push though, there's nothing like a little bit of competition:

Ludum Dare - Frequently hosted 48h game competitions.
GameJolt - Infrequently hosts uniquely themed competitions. You can also upload your finished games there for free promotion.
GameCareerGuide's Game Design Challenges - Although not always requiring programming, GCG's weekly challenges open up a lot of opportunity for networking and unique concepts.

Find a project
There are plenty of places to look, and it's been a while since I was on the lookout, but I reckon most of the hobbyist projects (because that's what every open source game project is right now) make an appearance at either of these waterholes:

GameDev.net - Help Wanted or
IndieDB - Jobs (they also have a
recruiting forum, I dunno why).
Remember, progress is the best sign of promise; look for it. Speaking of which...

Choose a project
Choosing the right project that matches your particular skillset and interests (no one's gonna want to work with you if you're not enthusiastic about the game you're making) can prove to be quite the challenge. Take your time, and for the love of all that is good pick (or start, but I'll get back to that) a project that looks perfectly achievable within just a couple months time, at most. There are disappointingly few of these around, but for a first-time open source project it comes highly recommended.
Extra pointers:

Don't start out too picky; look in
different sites, consider odd
genres, get to know the width of
your skill-sets and interests.
Consider scope. How much time are
you willing to commit? How soon do
you want to see the project finish? Any pending time-sinkholes (studies, work, life commitment) worth factoring in?
Start by talking. Exchange at least
1000 words with someone involved
in a given project before finally making up
your mind.
Now stick with it and bring it to
the finishline!

A great thing about open source projects is the low barrier to entry. There's loads of ways to contribute to a project besides applying your key skills. Just look at the CONTRIBUTING.md of any major project on GitHub for examples.
Honestly, the 'open source games' complete/incomplete ratio could use a boost. The beauty of transparency and open source though is that 'incomplete' is far from 'unsuccessful' so long as you make the most out of the ride.
Update: Also see my closely related article on opensource.com, which is based on this answer.
Comment: I actually took my answer and turned it into an article for opensource.com:
http://opensource.com/life/11/2/open-source-games-it%E2%80%99s-team-effort
Comment: Grrrreat answer, and it's full of useful links
Comment: The list you made gives Error 404.
Answer: There is a free game dev community based on the freegamedev forums http://forum.freegamedev.net/ and the associated IRC at #freegamer on freenode.net that you might check out for some projects you could potentially join.
Answer: SourceForge could be an idea, browse it and try to find a project that is active, interesting and may be accepting people, and get in contact with the current maintainers. You could branch off another project to add your own features, and merge in later.
Answer: Getting involved in the modding community might be a good option.
Alternatively there's a tradition of grabbing the source for games like Nethack, tweaking the source to add cool features, and releasing the changes as a patch.  The community is pretty friendly to boot.
Answer: The FreeGameDev community has a section for projects looking for collaborators and developers:
http://forum.freegamedev.net/viewforum.php?f=22
There is also the FreeGameDev wiki with more information on getting involved with open source / Free software game development.
The advantage that FreeGameDev community has over GameDev etc is that is it specifically for open source / Free software games.
The FreeGameDev community originated from the Free Gamer blog, which is a blog tracking Free software game news.
Answer: Some of the open-source game projects have wiki pages or bug-trackers where you can find out about stuff to be done and where to contribute.
I think in all cases it's a good idea to first get familiar with the game. Download and play it (if it's already in a playable stage), get familiar with the code, file bug-requests or try to fix open bugs. Get in touch with the developers.
Here are two links to (rather big) open-source game projects, but of course there are plenty others out there:

UFO Alien Invasion. A game based on the X-COM Series. They also have a wiki page about contributing to the project: http://ufoai.ninex.info/wiki/index.php/Contribute
Freeciv. An open-source strategy game like "Civilization"
Answer: Are you looking to contribute to a general framework as a way to learn about game programming? Or are you looking for an open-source-style community to help you learn?
If the latter (and maybe the former?), I recommend Pygame: http://www.pygame.org/
I got started with Pygame (for traditional game dev) many years ago for the original Boston Game Jam, and I found it to be a great tool for learning basic game development concepts.
Also, if you decide to try Pygame, don't miss the tutorials here: http://www.pygame.org/wiki/tutorials
Answer: If you want to have a go at participating in an open-source game project, then may I suggest Battle for Wesnoth. It's a fairly popular open source game with nice graphics and clean code base (from what little I remember. I haven't hacked on it, but I skimmed the code a few years ago).
It's written in C++ and Lua.


How to treat different frequencies of a time series data?

Question: I have annual GDP, annual CPI, monthly exchange rate, and monthly export data. I would like to go for estimation being monthly stock return as the dependent variable. What are the methods to treat the annual figures in to monthly and/or the monthly in to annual? Please, I need your recommendations or books to read?
Comment: One thing: in the title, you should use "frequencies", not "dimensions." The current title is confusing.
Answer: CPI is a stock while GDP is a flow. Re-sampling of stocks to higher frequencies can be approximated with a number of choices, but probably the most common is linear interpolation. In some contexts filling forward and filling backward are common. But in principle you could fit any function you want through all the points you have and use the values from the function instead. Flows are a bit more complicated because annual flows are the sum of monthly flows. Dividing the annual flow into twelfths across the entire year is analogous to filling forward or filling backward (depending on what month of the year is the date of annual measurement). For example, if GDP is 144 and measured in December of 2018, assigning every month in 2018 a value of 12 is similar to filling backwards. But again, as long as you remember that the flows are supposed to add up across months to equal or approximate annual flows you can you a number of functional forms to approximate them.
This is a big topic. I recommend searching for papers related to "interpolated time series". Resampling and Subsampling for Financial Time Series by E Paparoditis, DN Politis might be a good, if advanced, place to start. Modeling and Forecasting Time Series Sampled at Different Frequencies by Casals, Jerez, and Sotoca is another useful reference. In comparing the effectiveness different methods, Interpolation in Time Series: An Introductive Overview of Existing Methods, Their Performance Criteria and Uncertainty Assessment by Lepot, Aubin, and Clemens provides a nice list of methods but doesn't focus on the stock versus flow distinction.

Deterministic methods (fill forward or back)
Nearest-neighbor
Polynomial interpolation
Distance weighting methods
Fourier transformation based methods
Regression models
Auto-regressive models
Machine learning based methods
Kernel methods
K-nearest neighbors
Box-Jenkins models
Kriging-based methods
Answer: As there are no other answers, I will offer an informal answer.
Converting from annual to monthly data is effectively inserting information into the series. As a result, the choice of conversion will affect the analysis. It is safer to convert everything to the lowest frequency (annual), as that has much less effect on results.
To convert monthly to annual data, two standard techniques are to either take the latest value (December) or the annual average. It would make sense to have the choice aligned with the methodology for the annual data.
Unfortunately, I do not have books to suggest that cover this topic.
Comment: To convert monthly to annual for export data, surely the straightforward technique is addition?  I'm assuming here that the data are value of exports for each month.
Comment: Sum of all the months in the year? Sure, but that is just a scaling of the average (12 times the monthly average).


What is meant by the term "gas"?

Question: An Ethereum application that I want to use talks about needing "gas" to run.  What is gas, and where do I get it?
Comment: https://ethereum.stackexchange.com/questions/54606/what-is-difference-between-gas-gas-price-and-fee/54607?noredirect=1#comment64627_54607
Answer: "Gas" is the name for a special unit used in Ethereum.  It measures how much "work" an action or set of actions takes to perform:  for example, to calculate one Keccak256 cryptographic hash it will take 30 gas each time a hash is calculated, plus a cost of 6 more gas for every 256 bits of data being hashed.  Every operation that can be performed by a transaction or contract on the Ethereum platform costs a certain number of gas, with operations that require more computational resources costing more gas than operations that require few computational resources.
The reason gas is important is that it helps to ensure an appropriate fee is being paid by transactions submitted to the network.  By requiring that a transaction pay for each operation it performs (or causes a contract to perform), we ensure that network doesn't become bogged down with performing a lot of intensive work that isn't valuable to anyone.  This is a different strategy than the Bitcoin transaction fee, which is based only on the size in kilobytes of a transaction.  Since Ethereum allows arbitrarily complex computer code to be run, a short length of code can actually result in a lot of computational work being done.  So it's important to measure the work done directly instead of just choosing a fee based on the length of a transaction or contract.
So if gas is basically a transaction fee, how do you pay it?  This is where it gets a little tricky.  Although gas is a unit that things can be measured in, there isn't any actual token for gas.  That is, you can't own 1000 gas.  Instead, gas exists only inside of the Ethereum virtual machine as a count of how much work is being performed.  When it comes to actually paying for the gas, the transaction fee is charged as a certain number of ether, the built-in token on the Ethereum network and the token with which miners are rewarded for producing blocks.
This might seem odd at first.  Why don't operations just have a cost measured in ether directly?  The answer is that ether, like bitcoins, have a market price that can change rapidly!  But the cost of computation doesn't go up or down just because the price of ether changes.  So it's helpful to separate out the price of computation from the price of the ether token, so that the cost of an operation doesn't have to be changed every time the market moves.
The terminology here gets a little messy.  Operations in the EVM have gas cost, but gas itself also has a gas price measured in terms of ether.  Every transaction specifies the gas price it is willing to pay in ether for each unit of gas, allowing the market to decide the relationship between the price of ether and the cost of computing operations (as measured in gas).  It's the combination of the two, total gas used multiplied by gas price paid, that results in the total fee paid by a transaction.
As tricky as it is, it's important to understand this distinction, because it results in one of the most confusing things about Ethereum transactions to the initial learner:  there is a difference between your transaction running out of gas and your transaction not having a high enough fee.  If the gas price I set in my transaction is too low, no one will even bother to run my transaction in the first place.  It will simply not be included in the blockchain by miners.  But if I provide an acceptable gas price, and then my transaction results in so much computational work that the combined gas costs go past the amount I attached as a fee, that gas counts as "spent" and I don't get it back.  The miner will stop processing the transaction, revert any changes it made, but still include it in the blockchain as a "failed transaction", collecting the fees for it.  This may seem harsh, but when you realise that the real work for the miner was in performing the computation, you can see that they will never get those resources back either.  So it's only fair that you pay them for the work they did, even though your badly designed transaction ran out of gas.
Providing too big of a fee is also different than providing too much ether.  If you set a very high gas price, you will end up paying lots of ether for only a few operations, just like setting a super high transaction fee in bitcoin.  You'll definitely be prioritised to the front of the line, but your money is gone.  If you provided a normal gas price, however, and just attached more ether than was needed to pay for the gas that your transaction consumed, the excess amount will be refunded back to you.  Miners only charge you for the work that they actually do.  You can think of the gas price as the hourly wage for the miner, and the gas cost as their timesheet of work performed.
There are a lot of other subtleties to gas, but that should give you the basics!  Gas is the key mechanism that makes the complex computations in Ethereum "safe" for the network to work on, because any programs that run out of control will only last as long as the money provided by the people who requested they be run.  When the money stops, the miners stop working on it.  And the mistakes you make in your program will only affect the people who pay to use it--the rest of the network can't suffer performance issues due to your error.  They will simply get a big payday when the performance issues consume all of your ether!  Without this critical technique, the idea of a general-purpose blockchain would have been completely impossible.
tl;dr:

Gas is the way that fees are calculated
The fees are still paid in ether, though, which is different from gas
The gas cost is the amount of work that goes into something, like the number of hours of labour, whereas the gas price is like the hourly wage you pay for the work to be done.  The combination of the two determines your total transaction fee.
If your gas price is too low, no one will process your transaction
If your gas price is fine but the gas cost of your transaction runs "over budget" the transaction fails but still goes into the blockchain, and you don't get the money back for the work that the labourers did.
This makes sure that nothing runs forever, and that people will be careful about the code that they run.  It keeps both miners and users safe from bad code!
Comment: Note that currently, actual SHA-3 standard hashes are not what's computed by Ethereum.  Ethereum's "sha3" is the original Keccak-256 that was submitted in the NIST contest.
Comment: How does the ethereum virtual machine know how much computational work was done?
Comment: Great point explaining the difference between 'gas' and 'ether' and why there is a distinction. Not obvious to me at first.
Comment: Great explanation. Where can I check the gas cost of a transaction?
Comment: Great explanation, you just don't mentioned a concept used often "gas limit", probably it is not important but I would want to know what it is.
Comment: How do you convert gas to ether? What is the ratio?
Comment: " If your gas price is too low, no one will process your transaction "... How do they decide if a gas price is good?
Comment: @RameshPareek They figure out the value of the gas in local currency, estimate the cost of the electricity used to perform the work (and there's an upper bound thanks to the gas limit), and only perform the work if they'll profit.
Comment: It must be  an automated process written within the source code of ethereum which decides whether a price is good or not. Can you figure it out?
Answer: Short:
Gas is the execution fee for every operation made on ethereum. Its price is expressed in ether and it's decided by the miners, which can refuse to process transaction with less than a certain gas price. To get gas you simply need to add ether to your account.
Long:
Ethereum implements on the blockchain an execution environment called the Ethereum Virtual Machine (EVM). When you are running a decentralized application (dApp), every instruction is executed on every node of the network. This has a cost: for every operation that a script can execute there is a specified cost, expressed in number of gas units, that you can see in the EVM specification.
The price of one unit of gas is decided by the miners, currently it is around 5 to 21 GWei (One GWei is 10^9 Wei or 10^-9 Ether). Ethereum uses ether as its internal currency/token. Your accounts holding are expressed in ether. When you deploy a contract, or execute a transaction the gas will be taken from your account balance. You are free to specify a gasprice, or keep the suggest one.
Comment: When you say "The price of one unit of gas is decided by the miners" what do you mean? Do they arrive to a consensus somewhere via some procedure or how exactly they "decide"?
Comment: Each mining node should select a gas price that maximizes its profits.
Comment: From a theoretical PoV, each mining node should select a gas price that maximizes its profits. Since a block consuming more gas propagates slower in the network, there is an higher chance that it will become an uncle, netting only the reduced reward.  The minimum gas price accepted should be high enough to pay off for this increased risk.   What has been observed in the real network until now, it is that mining pools accept transaction with lowers gas prices that what would be economically rational to help reduce network congestion and increase overall network/token value.
Comment: So 1 gas = 0.000_000_001 ether? And 1 ether = 1,000,000,000 gas?
Answer: The following response is taken from Ethereum, Gas, Fuel & Fees
What is Gas?
Gas is the metering unit for use of the Ethereum "World Computer". As an analogy, electricity is metered by kilowatt hours. Using more computation and storage in Ethereum means that more gas is used. One fundamental reason for metering is that it provides an incentive for people (miners) to operate the World Computer. These miners get a fee for processing transactions, which is determined by the metering scheme: gas.
Each operation in the EVM consumes gas. For example, a multiplication (MUL) consumes 5 gas and an addition (ADD) consumes 3 gas. Here is a spreadsheet of Ethereum's operations and their gas consumption.  (It's also possible to consider them as gas costs, but it probably makes explanations more difficult to follow with costs, fees, prices flying around.)
Metering is different from fees and gas is different from Ether. To help clarify this, consider gas to be synonymous with fuel. A transaction must provide enough fuel, or startGas, to cover its entire use of the EVM's computation and storage facilities. All remaining gas is refunded to the transaction's originator: the user who initiated the transaction. A transaction that runs Out of Gas is reverted, but is still included in a block and the associated fee is paid to the miner.
With an overview from the perspective of fuel, let's turn to an overview of fees. While every operation in the EVM consumes a predefined amount of gas that is fixed (for example, a MUL operation always consumes 5 gas), a user can specify a gas price in every transaction. The current gas price is 0.02µ Ethers, or 0.00000002 ETH. The fee an originator pays a miner is the transaction's <code>(startGas - remainingGas) × gas price</code>.
Here is a summary of the influences of transaction fuel and transaction fee:

At the start of a transaction, the Ether required for the startGas is set aside [1b], and the remainingGas is set to startGas [1a]. [ 2 ] With each operation of the transaction, gas is consumed and remainingGas is lowered. [ 3 ] If there's an Out of Gas exception, all operations are reverted and all the Ether that was initially set aside is given to the miner [ 4 ]. [ 5 ] If the transaction completes successfully, all the remainingGas is refunded to the originator and the rest is paid to the miner.
Simple example
In the following mock scenario, assume that a STORE consumes 45 gas and an ADD consumes 10 gas. The scenario involves storing the number 31 in the EVM, summing 2 numbers, and then storing the sum. Let's assume that the originator specified a startGas of 150 and a gas price of 0.02µETH, Below is an illustration as the transaction is processed by the EVM:

The originator pays the miner a fee of (150 - 50) × 0.02µETH = 2µETH = 0.000002 ETH.
Fuel vs. Fee
There is a difference between an originator providing enough fuel and providing enough fees.  Here are the likely effects on a transaction:

[ 1 ] A transaction with too little fuel will not even reach miners, regardless of the fee supplied.
[ 2 ] If adequate fuel is provided for a transaction, but the fee is too low, even though the transaction may reach miners, upon examining the transaction miners will not perform any computation.
[ 3 ] A low fuel transaction implies that it will use little computation or storage resources of the EVM, or that at runtime it will hit an Out of Gas exception and be reverted.
[4, 5, 6] Fees determine the order in which transactions will be included in the blockchain.
[ 7 ] The reason why providing high fuel can lead to a transaction taking longer to get mined is discussed in the section Potential delays with high startGas.
In Bitcoin, metering is done with bytes: the number of bytes in the transaction. In Ethereum, computation also needs to be metered because a small amount of code could still be a program that runs forever. Metering computation is one of the reasons for gas. But having gas doesn't mean requiring fees.
For example, in a private chain each account could have X gas per day, or each account could have Y gas per transaction, or some other scheme. On the flip side, having fees doesn't mean requiring gas: fees can be based on different metering, such as bytes. Security in a public blockchain requires both gas and fees, while the alternatives are more applicable to private chains (for example, a scheme where each account has X gas per day can be Sybil-attacked in a public chain where anyone can create an account).
An ultimate example of metering not requiring fees, is when a contract is invoked with a call vs. transaction.  As explained in Who gets the fee from contract call?, an invocation with a "call" still uses metering but has no fees.
Comment: This answer appears to have been copied from https://media.consensys.net/ethereum-gas-fuel-and-fees-3333e17fe1dc, by a moderator here, without credit or reference.
Comment: @gpanterov I assume you meant "low gas price" instead of "low gas". Yes, his transaction _may_ be processed first if miners decide so (and they probably will). Miners have full control over the order of transactions. This is not a vulnerability, it's just how things work in Ethereum (and in almost every other distributed system). Contract developers should always assume that malicious miner will try to gain benefit by reordering their users' transactions.
Comment: Suppose I call a function in a contract with low gas. Someone else knows this and tries to swoop in front of me - calls the same function with more gas a few seconds after me. Is his transaction going to be processed first? That seems to be a major vulnerability
Comment: I have a question. In the case of a coin based off Ethereum, let's call it XOXO... I issue 1M. People buy it all (because is so popular)... when a payment is made in XOXO from address 123 to address 456... how is gas paid? At this point they are dealing with XOXO, not Ether.
Answer: Additional useful content on gas in Ethreum from: http://ethdocs.org/en/latest/ether.html#gas-and-ether
Gas and ether
Gas is supposed to be the constant cost of network resources/utilisation. You want the real cost of sending a transaction to always be the same, so you can't really expect Gas to be issued, currencies in general are volatile.
So instead, we issue Ether whose value is supposed to vary, but also implement a Gas Price in terms of Ether. If the price of Ether goes up, the Gas Price in terms of Ether should go down to keep the real cost of Gas the same.
Gas has multiple associated terms with it: Gas Prices, Gas Cost, Gas Limit, and Gas Fees. The principle behind Gas is to have a stable value for how much a transaction or computation costs on the Ethereum network.

Gas Cost is a static value for how much a computation costs in terms
of Gas, and the intent is that the real value of the Gas never
changes, so this cost should always stay stable over time.
Gas Price is how much Gas costs in terms of another currency or token
like Ether. To stabilise the value of gas, the Gas Price is a
floating value such that if the cost of tokens or currency
fluctuates, the Gas Price changes to keep the same real value. The
Gas Price is set by the equilibrium price of how much users are
willing to spend, and how much processing nodes are willing to
accept.
Gas Limit is the maximum amount of Gas that can be used per block, it
is considered the maximum computational load, transaction volume, or
block size of a block, and miners can slowly change this value over
time.
Gas Fee is effectively the amount of Gas needed to be paid to run a
particular transaction or program (called a contract). The Gas Fees
of a block can be used to imply the computational load, transaction
volume, or size of a block. The gas fees are paid to the miners (or
bonded contractors in PoS).

Other useful links:
https://www.reddit.com/r/ethereum/comments/271qdz/can_someone_explain_the_concept_of_gas_in_ethereum/
https://www.reddit.com/r/ethereum/comments/3fnpr1/can_someone_possibly_explain_the_concept_of/
https://www.reddit.com/r/ethereum/comments/49gol3/can_ether_be_used_as_a_currency_eli5_ether_gas/
Answer: Gas is basically the internal pricing for running a transaction or a contract.
The gas price per transaction or contract is set up to deal with the Turing Complete nature of Ethereum and its EVM (Ethereum Virtual Machine Code)
So, the more complex the transaction or the operation, the more gas it would cost.
Answer: Gas is what you pay to execute code on the blockchain and to transfer ether to another address. For each instruction on the Ethereum Virtual Machine you pay a certain amount of gas. Some instructions are expensive and some are cheap.
If you call a function and you run out of gas while executing this function call, all changes performed by the function will be rolled back and you will lose all the gas that you provided.
The reason that gas is needed for each instruction instead of simply a set fee to execute any function is that you could otherwise write a function which had an infinite loop, deploy this contract, and then call the function. If you did this, the miners attempting to include your function call in the next block would be stuck in an infinite loop.
Answer: First I want to tell about EVM (Ethereum Virtual Machine), As we know that Ethereum Network is a collection of computers and each computer has EVM software installed on their system and also all those systems have a copy of the blockchain where all miners are connected through EVM. When developer writes a smart contract then the code is compiled with the machine code and the machine code gets saved on the blockchain which is executed by EVM. I am not going to explain that what happens with this code in the blockchain in this question.
Now, Ether vs Gas ??
In the whole code, there are many instructions which are doing their work according to that instruction or code , for example code written to store value in memory or to perform SHA hash operation. Each operation has a cost. In order to execute your code or smart contract, you need to pay for all your operations which is paid in ether. The operation cost is in gas which is translated into ether and then it is paid in ether.
The reason for that is to decouple the price of an operation with the market price of an ether and the value of each gas which is a constant number in ether can easily be adjusted by the miners.
Answer: As the Ethereum network is a decentralised blockchain with no singular entity or authority overseeing its operation, a mechanism is put in place to avoid the network from being congested or spammed with transactions. This mechanism charges senders of transactions with a small fee called gas fee which is then used to reward miners who validate transactions on the network.
This fee is in the form of Ether (ETH) which is also used on the Ethereum network to facilitate value transfers, mining payouts and smart contract executions.
How gas fee works is similar to how gas/fuel works for our vehicles. In order to get from Point A to Point B, the vehicle needs to be filled up with a sufficient amount of gas.
Similarly, for a transaction on the Ethereum network to be successful, the sender must provide a sufficient amount of gas to pay for gas fees.
Source
Comment: See the other answer for the details but gas doesn't have a unit.
Comment: @Ismael, you are completely right and thank you for correcting me. Edited my answer.
Comment: Deploying on mainnet (aka actually writing to the Ethereum blockchain) requires real gas and therefore, real money. A best practice when developing web3 apps is to first deploy on a testnet as you can test your app and it's free. For Ethereum, you'd want to use the Goerli testnet...what this entails is you use essentially fake test Ether ("testETH") to test your project / contract. You get this Goerli testETH from Goerli faucets like goerlifaucet.com.
Comment: @a-gupta Thanks for adding the testnet explanation.
Answer: Deploying on mainnet (aka actually writing to the Ethereum blockchain) requires real gas and therefore, real money. A best practice when developing web3 apps is to first deploy on a testnet as you can test your app and it's free. For Ethereum, you'd want to use the Goerli testnet...what this entails is you use essentially fake test Ether ("testETH") to test your project / contract. You get this Goerli testETH from Goerli faucets like goerlifaucet.com.
You can also estimate gas fees with tools like this

What is meant by the term "gas"?


WordPress Terminology Options Vs. Settings

Question: What term should be used when defining a page in the admin menu that allows you to change a plugins options?
Comment: While the question regarding the difference in WordPress terminology between *settings* and *options* is valid, asking which term to use for a settings/options page label in the admin menu is primarily *opinion-based*.
Answer: These two are pretty close, but relate to slightly different stages of the process. In purely technical terms WordPress has two different APIs — Options API and Settings API.
Options API deals with saving and retrieving options from database. So its scope and scope of "options" in terminology is that of purely storage.
Settings API deals with admin pages, forms, receiving/validating/sanitizing data, and finally using Options API to store it. So in terminology it refers more or less to level of admin interface and user interaction.
Depending on nature of your plugin its page should be named either after its own name or after what plugin does. Then it should be nested appropriately in a level such as Settings or Appearance. Creating top level pages for the plugins is not uncommon, but is often considered overblown and annoying, especially so if the plugin/theme doesn't have many things to put there.
Comment: The terms _options_ and _settings_ are all too often used interchangeably (and therefore confusingly). This is an excellent explanation of the distinction between the two.
Answer: You should just use the name of the plugin. No need to concatenate "options" or "settings" to it.
A lot of times (if the plugin is small, or you rarely need to change it's settings) you place the plugins admin page under the "Settings"-page that already exists.


Messaging over Stellar - Is that right to do?

Question: <code>/*
 * Hi!
 *
 * I'm sending this tiny library for you to check. This is the basis of the
 * on-chain signature collection solution I'm writing. It includes collecting
 * signatures for multi-signatures accounts as well as sharing transactions XDR
 * between signers.
 *
 * The present module implement a messaging system to cut and send those datas
 * to the blockchain. It takes advantage of the fact that one can set the value
 * of the same data entry up to 100 times in one transaction. Actually, 99 as
 * the first operation is a payment of 0.0000001XLM to the destination address.
 *
 * The signature/transaction sharing solution will makes use of dedicated
 * addresses where to send/collect those datas.
 *
 * The reason I'm sending this to you is that the same messaging system could be
 * used to "abuse" the network. Well, actually you're the one to say if it would
 * be an abuse or not. And I'd like to know about that.
 *
 * Using this library, one can send up to 6KB to the blockchain for a cost of
 * 100 stroops. This could open very interesting possibilities, like mailing
 * over Stellar, on-chain twitter-like services and even some basic blogging
 * capabilities as gzip would allow to emit articles up to 16KB.
 *
 * I know you keep your archive light, so this may be a bit disruptive or
 * incompatible with your current goals for Stellar.
 *
 * Just for you to know, I'm not the only one who found about this and some
 * people mentionned it indirectly on Galactic Talk. Umbrel implemented it in
 * a transaction-passing solution for papaya bot a few days ago. So this
 * possibility is not going to stay secret anyway.
 *
 * I've been thinking about how to prevent abuse of this features and I didn't
 * found solution, really. It could be made that one have to use 99 different
 * data entry instead, but it would burden the account with cryptic labels
 * and the additionnal cost would be payed only once - it wouldn't do.
 *
 * We could fix a maximum of 10 manageData operation or so per transaction.
 * But it would only make it a bit harder to code the exact same thing.
 *
 * We could raise the fee for this kind of transaction, but it would make
 * multi-sig collection expansive which may not be desirable at all.
 *
 * Another solution that would cut the possibility of on-chain signature
 * collection would be to forbid mixing manageData operations with other kind
 * of operations. But of course it would forbid a lot of precious innovations
 * as well.
 *
 * So I would recommend to let it happen and see how much GB it's going to grow.
 * Eventually the message-passing transactions could be recognized as such and
 * deleted after a delay of a year or so, to prevent the archive to grow too
 * big. I assume that the cost of the GB of storage is low enough for that to
 * works.
 *
 * Well anyway it's only the conclusion I came to. I assume to are in a better
 * position than me to say what we should do with that. And if you're open to it
 * I'd be glad to code some mailing over Stellar demonstrating the possibilities
 * of the network.
 *
 * I really wonder if you did expect this kind of things when calling
 * developpers to innovate and surprise you with new uses of your blockchain?
 *
 * Antoine alias Mister.Ticot
 */

(function (root, f) {
  'use_strict'
  if (typeof module !== 'undefined' && module.exports) module.exports = f(root)
  else root.messenger = f(root)
}(this, function(root) {
  'use_strict'
  if (typeof require !== 'undefined') var StellarSdk = require('stellar-sdk')
  else StellarSdk = root.StellarSdk

  /// Get Buffer constructor from StellarSdk
  var memo = new StellarSdk.Memo('hash', '0000000000000000000000000000000000000000000000000000000000000000')
  var Buffer = memo.value.__proto__.constructor

  var messenger = {}

  /**
   * Build a transaction to be signed by `senderAccount` to send `message` to
   * `destination`, with `object` as memo. The maximum size for `message` is
   * 6336 bytes.
   *
   * The cost of emission is 1 stroop + 1 stroop for each 64 bytes to send.
   *
   * @param {AccountResponse} senderAccount The Account object as return by `StellarSdk.Server.loadAccount()`
   * @param {String} destination The publicKey where to send the message
   * @param {String} object The memo of the transaction (max. 28 bytes)
   * @param {String} message The message to be send
   * @return {Transaction} A StellarSdk Transaction object
   */
  messenger.send = function (senderAccount, destination, object, message) {
    var transaction = new StellarSdk.TransactionBuilder(senderAccount)
    if (object.length > 28) console.log('Warning: object will be truncated.')
    transaction.addMemo(new StellarSdk.Memo('text', object.substr(0,28)))
    transaction.addOperation(StellarSdk.Operation.payment({
      destination: destination,
      asset: StellarSdk.Asset.native(),
      amount: '0.0000001'
    }))
    var array = new Buffer(message)
    if (array.length > 99*64) console.log('Warning: message will be truncated.')
    for (let i = 0; i < 99; i++) {
      const chunk = array.slice(i*64, i*64+64)
      if (chunk.length === 0) break
      transaction.addOperation(StellarSdk.Operation.manageData({
        name: 'Send',
        value: chunk
      }))
    }
    return transaction.build()
  }

  /**
   * Return the message object from `txHash`, using `server` to fetch datas.
   *
   * @param {Server} server A StellarSdk Server object
   * @param {String} txHash A transaction hash
   * @return {Object} A message object with `sender`, `object`, `date` and
   *     `message` fields.
   */
  messenger.read = function(server, txHash) {
    var caller = server.transactions()
    return caller.transaction(txHash).call()
      .then(function(answer) {
        return {
          sender: answer.source_account,
          object: answer.memo,
          date: answer.created_at,
          message: extractMessage(answer)
        }
      })
  }

  function extractMessage (txCallAnswer) {
    if (txCallAnswer.operation_count < 2) return null
    var array = []
    var tx = new StellarSdk.Transaction(txCallAnswer.envelope_xdr)
    tx.operations.forEach(entry => {
      if (entry.type === 'manageData' && entry.name === 'Send') {
        console.log(entry.value)
        array.push(entry.value)
      }
    })
    return Buffer.concat(array).toString()
  }
}))
</code>
Answer: I can't speak for the SDF, but since you are asking about this, you probably already have guessed that this is not intended functionality. As such, I wouldn't rely on this behavior being there forever for any particular product you're developing. I would expect this to be addressed if it ever became a widespread problem.


Difference between "food" and rice

Question: According to my friend, there is a difference between "food" and "rice". Well, for her every other thing we eat with rice is "food", and rice is just rice for her. For example, If we eat chicken and rice, then she calls chicken as food.
Comment: This is called [idiolect](https://en.wikipedia.org/wiki/Idiolect). In her idiolect, there is a difference. But from the English language standpoint, there's nothing to discuss. Rice is food.
Answer: Is your friend a native speaker of English? I suspect she might be mapping words from another language onto English. (Rarely is there ever a perfect fit.)
In East Asia, for example, rice is the most important staple, and in most areas some kind of rice or rice product is eaten with almost every meal. It is so central that the Chinese character 飯 indicating cooked rice can also mean food or meal in general, in Japanese as well as Chinese use. In Korean 밥먹자! (bab meokja!) translates literally as "let's eat the cooked rice!" but ordinarily just means "let's have something to eat!" or "let's dig in!"—even if you are having goulash or tacos.
The point is that historically, if you asked someone what she was going to have for dinner, she would never have answered "rice"— that would have been taken for granted. I have older Korean relatives who to this day will chuckle if I tell them I had rice— well, obviously. When they ask me what I had for dinner, they want to know what meat, stew, and 반찬 (banchan, side dishes) I had. This seems to correspond to the distinction your friend is making between the staple/core of the meal and its accompaniment.
None of this applies in English, however; in standard usage, the distinction your friend makes does not exist. Rice is simply one type of food. Declaring that food only refers to foods other than rice is unsupported either by common usage or by dictionaries. I do not know if her use is common, but anecdotally speaking, none of the people I know who might refer generically to food or a meal or a dish as 飯 or 밥 in another language ever use rice in that way in English.
Bread is the nearest Western equivalent. We still have many expressions involving bread in English, like breaking bread (sharing a meal) with someone, something being your bread and butter (essential or basic), or knowing which side your bread is buttered on (recognizing a benefactor or source of advantage). Still, I do not think bread ever attained the cultural centrality in the English-speaking world that rice did in southern and eastern Asia, and I have never come across anyone who would try to declare that bread was in a special class of edibles. Bread is food, just like everything else you eat.
Answer: The OP's friend  might be thinking of starchy foods (today more commonly known as foods high in carbohydrates, carbs)  compared to other types of food. She probably considers that "rice" = filling, but "food" = nutrition/taste.

Starchy foods include bread, pasta, rice, couscous, potatoes, breakfast cereals, oats and other grains like rye and barley. Although these starchy foods are often referred to as 'carbs', this is a little misleading as carbohydrates include both starch and sugars, as well as fibre.

Maybe she is thinking that rice, potatoes and bread alone are not meals by her standards. But the terms meal (breakfast, lunch or dinner) and food have distinct meanings.
To sum up,  anything ingested for energy is considered "food" in English. In many cultures, even insects (entomophagy), worms, caterpillars, and leaves are "food".
Answer: Is your friend a native English speaker? It's possible that that is how it works in another language she speaks and she has transferred that construct into her English. In a way, I understand what she is trying to say i.e she wouldn't eat just rice as a meal and it's more of a complement to the more important/enjoyable parts of the meal e.g chicken, some other type of meat, etc. Where I grew up, the veggie sauce and meat were considered the most important parts of the meal and I assume she has also grown up with similar ideas.
Regarding your question about whether food and rice are different, your friend is wrong and rice is definitely a type of food.

Difference between “food” and rice