Hacker Newsnew | comments | show | ask | jobs | submit | bkanber's comments login

I've got three!

A highly opinionated project management saas: http://kati.burakkanber.com/

A long term HTML5 RPG project: http://thebotanistgame.com/

And I'm working on a really interesting giga-scale chatroom UX, intended for live chat in a room with hundreds or thousands of active participants. Mostly as a UX experiment.

-----


PHP is a decent language and ecosystem these days. Perhaps one of the minority of ecosystems that are actually on the rise rather than on the decline. It still has lots of warts, but whatever. Forget the idea that PHP is "taking what you can" or not a sane language -- you're in it now so might as well get up to speed with best practices and use it the best you can. I promise you can build compelling software in PHP.

http://www.phptherightway.com/ is a great resource for most things you'll need to know when working with modern PHP. Definitely start here.

Familiarize yourself with the ecosystem by poking at the most popular frameworks, at least skimming the docs to understand the types of things they provide and how they're structured: Zend, Symfony and Symfony Components, Laravel, Slim, Silex. Study WordPress, the "stereotypically bad" piece of software, for anti-patterns, but there's also a lot of good stuff in there and some improvements on the roadmap.

Composer is the npm of PHP. Check out packagist (horrible UI though) or browse github's PHP repos to find some of PHP's commonly used packages, like Monolog and phpunit. You can build a simple app in minutes in Laravel, and even put together a small product MVP using 90% boilerplate code within a matter of days on Laravel. Since there's a growing ecosystem for these tools now, it's getting easier and easier to write quality software in PHP, and it's actually a relatively pleasant experience.

Plus shipping and managing PHP in production is a breeze -- it's the most widely supported web platform, after all. We've got support on great CI systems like circleci and scrutinizer-ci.

Anyways, start there and good luck!

-----


Seems wild to me that such an important service, run by an infrastructure company, would have an invalid SSL cert on their control panel (as reported by Chrome).

Does anyone know what might have happened here? I have no idea if it's safe to log into the control panel right now.

-----


Literally every major infrastructure company has accidentally let a SSL cert expire. Google, Microsoft, Apple, Cisco, etc. etc.

-----


This one isn't expired though (June 2015). Either they cheaped out, or misconfigured, or there's some kind of MITM attack going on.

-----


It's possible that one of their intermediate certs expired. This caught Google a couple months back.

-----


Honestly PHP was a breeze!

There's only a couple of things that stood out to me as suboptimal:

- PHP ncurses is not well documented beyond just function signatures. Of course, curses itself is well documented, and ncurses functions map one to one with the PHP extension, so that wasn't really that bad.

- I should have separated my classes and built a PHAR (PHP archive), but I got lazy.

- There's the portability comment I've made a few times already

But other than all that, PHP did its job perfectly. Easy to write, read, and organize.

-----


Did you know that Slack itself is also written in PHP?

https://twitter.com/SlackHQ/status/426469205005705217

-----


Note that this tweet clarifies that P stands for PHP and not Python or Perl: https://twitter.com/SlackHQ/status/499432194398756864

-----


You're the only person in here who criticized my use of PHP that I actually agree with.

I never intended to release this app, and wanted to build it in PHP for fun, so I stuck with it.

But you're absolutely right on the portability problem. I do agree that, had deployment been an actual interest of mine, PHP would be the wrong language for this.

-----


Thanks, appreciate it! I considered Go for this too, but wanted to use PHP because you don't see too many curses PHP apps around, and I wanted to observe one for myself ;)

-----


> command line interfaces should be written in bash, perl, python, go

Says whom?

-----


Basically, anything that can be compiled into a single binary, or has the least dependencies and best portability.

-----


Right. Hard to argue with that. But if you're going to say that to me, then you'll also need to tell that to everyone releasing software that gets installed via `npm install -g` or `gem install`, too!

-----


Absolutely and that's why orgs like Heroku,Github and co are moving all their cli tools to Go.

-----


That's true! But there are two reasons I didn't go that route:

1) I wanted to build this ;)

2) Slack's IRC integration does not mark messages as read until you exit the IRC client. (Granted, mine doesn't mark them as read at all, but -- it _can_!)

-----


I upvoted this comment because I really like the idea of "I built this because I wanted to". I like the idea of Show HNs as an "I made this thing for me, and not for any other reason". Thanks for posting your project!

-----


Reminds me of this comic, which I've always thought had something positive to say to engineers: http://wondermark.com/666/

-----


I love that thank you

-----


> But there are two reasons I didn't go that route:

My biggest issue is that Slack doesn't allow non-paying accounts (I forget what they call the tier - "guest" account or something) to use the IRC gateway.

There's one project I'm involved with that moved its support channel from Freenode to Slack. I used to idle in the channel 24/7 thanks to ZNC, and now I have to actually log in through the web interface every time I want to ask a question. It's their loss, too, because I'm also no longer as available to answer other users' questions.

If you run a software project, please, please, do not host your support channel on Slack. I don't want to have to request an invitation just to join the channel, and I don't want to have to either download and open the Slack app or use their web interface[0] just to ask a question or answer other people's questions.

[0] Their web interface has really terrible performance, and last I checked, their Linux "app" was just a webview around said web interface, with equally terrible performance.

-----


At the company I work for, we don't have a paid Slack account for our team, but I remember at least one of my coworkers using his regular IRC bouncer to connect to Slack.

Maybe they changed the rules since the last time you checked?

-----


2) is a pretty good point actually, maybe slack could integrate that in their backend - basically if the irc client is set as away do not mark read. if not or returns from away, make all buffers read.

Not too hard and would be quite convenient (im not a slack user, but if i become one, id like that in case i log in the webui later..)

-----


Totally understand. My comment was just meant to inform other readers not dissuade you from building awesome apps!

-----


Good on ya son

-----


I actually intended to write a comment in the README about my choice of language, but as things go, I forgot.

This was, first and foremost, an educational pet project for me. I /like/ building things in the wrong language. Hell, I run a blog called "Machine Learning in JavaScript", and I can't tell you the amount of criticism I've gotten over the years along the lines of "wrong tool for the job!".

I was actually surprised how well this worked in PHP. The only issue is that the ncurses PHP extension, not being compiled by default in most package managers' PHP distribution, does force you, the user, to take an extra step in installing it. That is unfortunate.

That would be a grave issue if I saw this as a product, but since it's a pet project, I see that as totally acceptable :) I actually never even intended to release this publicly!

-----


> I /like/ building things in the wrong language.

That's not the issue here. You could have written that in shell script it wouldn't matter. Just that PHP(+ all the extensions required) makes it more difficult to deploy for someone who just want to try out your project.

-----


I disagree. When I build a project for fun, or for education, as in this case, the last thing I want to be thinking about is you!

-----


I don't believe you read the comment you're replying to.

-----


Source: I have a master's degree in mechanical engineering in hybrid vehicle powertrains, and a big part of my research was battery technology. I spent some time working with the folks at National Semiconductor learning this, so I have several primary sources.

Disclaimer: my knowledge of the field is from ca 2010.

1) Lots of deep discharge cycles do negatively affect battery life. Try not to jump between 0% and 100% too much.

2) Li-ion batteries do not love being at 100% SOC (state of charge). As batteries become more dense, the membranes become thinner. High SOC equates to high chemical potential, which will break down membranes faster. As such, avoid leaving your battery at 100%. This wasn't as much of a problem with older batteries with thicker membranes, but is becoming more and more an issue as we try to squeeze every ounce of density out of batteries.

3) Roughly 70% SOC is where a battery is happiest, but the whole range of ~30-80% is pretty happy for a li ion cell. Try to keep your battery at ~70% or so overnight, at 50% or so for long sleeps.

A good usage pattern: plug in and let charge to 90%, unplug and use for a couple of hours, plug back in at 50% or so, rinse and repeat.

-----


That's nice to know.

However, i'd rather buy a new battery after 5 years (if my laptop is still fit and the battery is dead), than having to complicate my life and think about when to unplug or charge my laptop multiple times each day for 5 years...

My Macbook air from mid 2011 is currently at 100/6700*5629 = 84% battery health. (6700 = design capacity, gathered from "ioreg -l -n AppleSmartBattery -r".

-----


I agree with you. Instead of optimizing for battery life by constantly checking & adjusting my charging, I'd rather live my life focusing on other things. What I do is super simple: plug it in whenever possible.

-----


Same here. I have no reason to dispute the expert who says Lithium-ion batteries "don't love 100%". Fine, but they don't seem to dislike it too much, either. So far I haven't had any batteries that didn't perform well when they were mostly plugged in, occasionally discharged in mobile use.

I see some similarities to, e.g., medical pronouncements that some particular food increases risk of cancer. It's easy to get alarmed, but there's a big difference between it increasing my likelihood of getting cancer by 0.05% and making cancer, say, (just to illustrate the point) 100 times more likely. The former I would likely ignore and the latter would probably make me give up the food instantly.

-----


I get what you're trying to say, but there's an interesting point to be made here about absolute vs relative risk: imagine for instance your absolute chance of getting cancer was less than 0.0005%

-----


A ThinkPad takes care of everything https://forums.lenovo.com/t5/image/serverpage/image-id/10659...

-----


Is your machine even operational? My macbook air from 2011 (with Yosemite) is sluggish to the point of being unbearable to use and just collects dust.

-----


Yosemite is a total mess, but it has gotten slightly better with 10.10.3 (if you are willing to ignore the Photos app, which launches constantly for no reason).

If you are willing to mess with drivers, you may want to try installing Linux. On a 2013 Air, battery life and performance (even graphics!) are surprisingly better with Debian Jessie than with OS X. Of course, it is a newer model than yours, but the drivers will only be more stable and mature with a 2011. Especially if you have 4 GB RAM and you're running into a memory barrier with OS X, you should see a significant improvement.

-----


My Photos app was launching because it got reset at the default action when my iPhone connected. It's possible that's what is happening to you too.

-----


My iPhone and a couple flash drives do this, probably because it thinks my scanner is a camera. Unfortunately I can't stop it from launching (assuming I can disable it in Preferences) until it will actually launch—I have left it beachballing for a very long time and it still has not finished launching, so I just force quit it.

-----


Open the Image Capture application, and you can change the setting at the bottom-left of the window. It seems to get increasingly hidden with each OS release.

-----


This used to be the only place to change the setting—which was ridiculous because virtually no one ever used Image Capture (especially because iPhoto opened by default). But to Apple's credit, you can now also change this preference in Photos. Of course, as the previous poster pointed out, you have to actually wait for Photos to finish launching. But at least it's there now!

-----


If you want to stay on OSX:

Always 'Quit' open apps you don't use, never, NEVER have 2 sessions open at the same time, and try using lighter applications when you can (VLC instead of iTunes for music, Skim instead of Preview for PDFs, Preview instead of Photos for images, etc)

I have to use a 2012 MBP with Yosemite from time to time and if I follow these rules it is definitely bearable.

-----


I recommend VOX over VLC because it has Soundcloud integration and looks nice.

-----


My 2011 11" Air (i7) runs 10.10 just fine. I haven't noticed any slowdown over the past 4 years, although I do disable all the unnecessary transparency and animations Apple keeps adding for seemingly no reason.

By the way, my battery health is also around 85% after 500 cycles and being plugged in and charged to 100% whenever possible.

-----


Switch to OSX 10.9, problem solved. My 2012 rMBP with top end specs is also sluggish on 10.10.3. Not sure what Apple is thinking. On the other hand I am still using my 2003 Panasonic CF 73. It's not quick, but for the limited tasks of automating my DSLR it works perfect.

-----


Define unbearable. Up until 10.10.2 the OS X window server was a bit sluggish. Now it's tolerable for my purposes.

-----


MacBook Pro (13-inch, Early 2011) 2.3Ghz i5, self-upgraded hardware to 16GB 1333MHz DDR3 RAM, Samsung SSD 120GB, caddy with 500GB HD, replaced battery with cheap Chinese, running 10.10.3 like a charm (only my SD-card slot never worked).

-----


Yes, mine still runs smooth, that's why i always buy the fastest model (processor) available, it's more expensive when buying but usually saves money in the long run. (i have the 1.8GHz Dual-Core Intel Core i7)

-----


my macbook 2008 running os x 10.7.5, 128gb ssd and 4gb ram is still fast enough and gets the job done. It's even faster than the latest middle to low end windows PC's (dual boot with windows 7)

-----


MBP 2009 here... works as good as new. Only upgrade was a SSD for the hdd. Still only 4GB RAM. Wouldn't want to do much video/graphics processing but everything else is fine.

-----


Mid-2010 MBP upgraded with SSD runs perfectly on 10.10.3

-----


Same here, only boots extremely slow (I have the original HDD but 8gb memory)

-----


You should really upgrade to SSD. Makes a huge difference (easily 5-10X speed-up for many tasks).

-----


I run Windows on mine and it runs fine (late 2010 13", 4GB model). Only use it when travelling though.

-----


Agreed. I do avoid leaving my laptop plugged in overnight, but I'm also not too careful about leaving it plugged in during the day. I'll often pop the charger out when I notice the battery at 100%, but I'm not going to lose sleep if I forget about it or operate slightly sub-optimally.

-----


I have a Lenovo Yoga Pro 2, it's got an app that manages this for me. I turn on "conservation mode" and it keeps the charge at 55%-60%. The only negative here (and it would be there with doing it yourself) is that if I run out without the charger I'm essentially at 1/2 capacity.

-----


Could you clarify how you arrived at 84% battery health? After the command "ioreg -l -n AppleSmartBattery -r" I see DesignCapacity, but where does the other number (5629) come from? I'd like to compute battery health myself...

-----


running

  ioreg -l -n AppleSmartBattery -r | grep -i capacity
gives me

  "MaxCapacity" = 8329
  "CurrentCapacity" = 8002
  "DesignCapacity" = 8440
I'm guessing MaxCapacity or CurrentCapacity (I'm at 100% charged on a ~1 year old MBP, so I don't know which number is appropriate)

-----


Your battery percentage is going to be:

    100 / DesignCapacity * MaxCapacity
Or, in the way that makes way more sense to me:

    MaxCapacity / DesignCapacity * 100
Which, with your results, yields something to the effect of:

    98.68%
It's kind of (read: very) dirty looking, but you can get the same result with:

    echo $(ioreg -l -n AppleSmartBattery -r | grep MaxCapacity | awk '{print $3}') / $(ioreg -l -n AppleSmartBattery -r | grep DesignCapacity | awk '{print $3}') \* 100 | bc -l

-----


    ioreg -l -n AppleSmartBattery -r | awk '/MaxCapacity/{mc=$3};/DesignCapacity/{dc=$3};END{print 100*mc/dc}'

-----


mine is at 103.211

-----


He's just dividing the current battery capacity by the 'new' battery capacity. You can just let a program like Coconut Battery do it for you.

-----


Coconut Battery is nice. You can let it take snapshots and compare it with other batteries online. You can view my battery health here http://ccbonline.coconut-flavour.com/index.php?bid=d78a6c124.... I try to unplug at 100% and recharge it at 10-20%. Once per month I drain it all the way to 0%.

After reading this thread I try to keep my battery at a 50-80% charge :)

Except when I do some CPU intensive stuff like compiling or rendering, then it is being charged thought the process.

-----


Just another data point: I'm at 77% (4431/5770) on an April 2010 MBP. I tend to leave it plugged in when possible, and often run it far down when not near an outlet. I take it that's about the worst I can do, but the convenience has seemed worth it.

-----


On ubuntu, you can do something similar with

    upower -i /org/freedesktop/UPower/devices/battery_BAT1 | grep capacity | awk '{print $2}'
You can see all of your power options with

    upower -e

-----


On Debian:

    bc -l <<< "100 * $(cat /sys/class/power_supply/BAT*/energy_full) / $(cat /sys/class/power_supply/BAT*/energy_full_design)"

-----


With thinkpad acpi modules you can write scripts to automate this. https://wiki.archlinux.org/index.php/Tp_smapi

-----


Agreed. My mid-2012 Macbook Pro Retina has been plugged in @ 100% nearly all the time it's been in use. Pretty much the only time it's not plugged in is when traveling. Battery is at 7845/8460 CurrentCapacity/DesignCapacity or 93%.

-----


I treat the 2012 MacBook Air I use at work the same way. It's plugged in all the time, and it stays in the office. I think its capacity is 95% or higher.

-----


Same but slightly worse, mine is generally always plugged in.

100/8460*7633 or 90.22%

-----


Could you elaborate on how you arrived at the "5 years" lifespan for batteries having charge state of 0-100%?

-----


That was just a personal estimate, obviously if the battery health is for example at 75% you also lose 25% of 'the time' to work without plugging it in... so if that becomes a problem when traveling i might want to buy a new one. For others this might not be a problem of course.

-----


Ok. I was wondering if the breakeven is set as 5 years but if the cycle of tilt to full makes the life shorter for the battery, then it may not be worth it. I agree that if I've to weigh battery life vs my time, I would go with the latter.

-----


So what my laptop should do automatically is to stop charging once it hits ~90%, and start charging again when it hits ~40%. And the OS should give me an easy-to-reach option to "charge to 100%" for when I'm about to make a trip. Why hasn't anyone implemented this yet?

-----


I have this as "conservation mode" on my Lenovo Yoga Pro 2, and probably all new Lenovos.

-----


See Siracusa's analysis of this suggestion.

http://atp.fm/episodes/33-a-30-minute-skip-button

TL;DR: good idea, but people will forget and become shitty when their laptop isn't at 100% when they go on a trip.

-----


My Sony VAIO had this 7 years ago.

-----


Yeah my thinkpad did this from the same vintage but that was only on Windows. I think quality of battery management on other Operating Systems is varied...

-----


My ThinkPad E530 (1 year old) has this, it's part of Lenovo Power Manager. Again, only on Windows (it doesn't charge at all in Ubuntu, which I've never managed to get to the bottom of)

-----


Macbooks have also done this for, like, forever, but more with the top few percent than 10%-60%

-----


Yeah, it lets it drop to about 97% before it starts charging again. That doesn't really count, although I guess it's nice.

-----


Yes this is not real battery care-taking. Ubuntu does it by default like that (I guess linux kernel in general). Although the low and high thresholds (97 and 100% resp.) are adjustable.

-----


You're right. Someone should have done it in each OS. In linux it's just a matter of echo-ing a few numbers to the write "files". I just made a script to do it, see my other comments here if interested.

-----


This assumes the battery percentage displayed is the SOC. This might be the case for laptops or small appliances where manufacturers are happy to trade long battery longevity for a small gain in time to empty, but the Model S for example has gap of a kWh+ and will simply not charge or discharge the battery fully, to avoid these cases where a very low of very high SOC damages the battery.

-----


Correct. I, of course, am talking about battery cells, and not battery systems. It is up to the reader to understand the specifics of their use-case and apply this information appropriately.

-----


>plug in and let charge to 90%, unplug and use for a couple of hours, plug back in at 50% or so, rinse and repeat.

My thinkpad has a mode for keeping a healthy battery that stops charging at 90%, then trickle charges to keep it there (it also allows for fine tuning of this behavior)

-----


Yes my Samsung Serie 7 (now Ativ Book 8 I think) has the same feature (stops charging at 80%) and I think my previous Sony Vaio also had something like that..

I use it on my Samsung given that I don't really need +5 hours without plugging anyway.

-----


excellent - what software does this? Built into the OS or a separate application?

-----


On ThinkPads this can be (or maybe used to be) configured in one of the preinstalled ThinkVantage utilities (Power Manager). But I believe that the whole charging logic itself is really in EC firmware and this application is only user interface for that.

As an aside: the mechanism works in slightly different way (at least on all of my 4 thinkpads of different generations). There are two thresholds, maximum battery capacity when charging can start and capacity when charging stops, the aforementioned application even seems to have some kind of logic to set these thresholds according to battery aging.

Also, trying to keep Li-ion cells charged to constant state of charge is not good for their lifespan. What is commonly known as trickle-charging (charging by infrequent, short but large pulses of current) is actively discouraged by most cell manufacturers, sometimes even citing safety reasons.

-----


It's definitely a separate app. Lenovo has various versions of "Power/Energy management" apps available depending on the specific model of the laptop. Not sure about other manufacturers though.

-----


From experience, it's a separate app but manufacturer specific. Haven't had much luck looking for a generic app.

-----


Why don't device manufacturers code this kind of thing into their power/battery drivers?

-----


Is it possible they do, and the battery level indicator you're looking at is lying to you?

-----


I don't know, but there seems to be not very much incentive to invest a lot of R&D dollars on this problem from a manufacturer standpoint:

* Devices marketed on how long they last on a single charge, but much less often on how quickly the battery degrades * Batteries are a later upgrade upsell opportunity * I would not be surprised to learn that a significant number of device upgrades start as simply wanting a better battery (but why not upgrade at the same time)

-----


This is often the case. Not all the time, but lots of devices have started doing this.

-----


This is definitely the case for the Prius, even from 2004. I really doubt higher-end manufacturers like Apple wouldn't do the same since they control the entire stack.

-----


I'm not sure I'd want my battery to be "that" smart, safety measures coded into the power/battery drivers (which would be present on the battery itself, not main OS drivers) sounds about right. Optimizing and things like that I rather leave up to the OS, or even an APP (as long as it cannot do anything dangerous).

I mean it's one thing if my OS can control the charging cycle to some extend, whether Apple can install drivers (and bad guys bad stuff) on my Battery "smart" board.

It may seem like a big leap now, but I bet someday (or perhaps even now, why do people place tape on their webcams otherwise) it could become a problem.

But of course, to my knowledge so far Apple is doing a pretty good job in keeping Macs and OSX kind off secure (don't quote me on that), however than again I don't want OSX to become as restrictive as iOS or I'll have to switch to Linux t get my dev-tools working. (not a fan of that personally)

-----


Granted device manufactures are pushing devices out every year or two, and it's in their best interest to offer the longest battery life possible, there is no incentive or evidence present that manufactures are limiting the maximum charge to prolong battery life.

-----


Having read similar perspectives I was always annoyed that there was no way to essentially pause the charging and perhaps run via trickle charge at a set percentage, so if I'm tethered to a desk for a week I could keep the battery at 70% and then choose to bring it to 100% if I expect a long day away from an outlet. Perhaps this is not plausible for some reason? Would it be control required at the battery firmware level? (Referring to an Apple laptop for example)

-----


The only concerns I have with this advice is the heat generated by constantly draining/charging the battery will degrade the life, plus constantly cycling will degrade the battery in other ways as well.

If a charger could be tweaked to charge the battery slowly and not overcharge it, that'd be the ultimate solution.

SOC is relative to the application, but it is possible many applications nowadays purposely operate within a specific SOC and not exactly 0-100%. We need an Apple battery engineer in here to confirm ;)

Edit: You already acknowledged this elsewhere.

-----


Temperature, temperature gradients, heat, membrane potential, charge/discharge speed, etc, are all variables in long term battery life, along with dozens of others.

So I'm reluctant to agree or confirm with any sweeping statement about a single variable (in this case, heat generated by charging), because it may be true in some cases but not in all. And it also depends on the specific battery.

Most likely, for most laptops, for most daily use-cases, and a charging pattern of 90-50-90 in 2-3 hours, I'd rather take the slightly increased temperature than keep the battery at 100% for that time period.

But again: it depends. On so many things.

Edit: also, either case (keeping at 100% for 3 hours vs 90-50-90 for 3 hours) is better than keeping at 100% 24/7. So no harm done if you can't decide which is better. Just A) don't plug in all day long and B) don't go crazy with the heat and you'll be fine.

-----


The Thinkpad power manager mentions the issue and comes with different modes to maximize the battery lifespan.

Quote: "If you primarily use your computer with the AC adapter attached and only infrequently use battery power, battery deterioration may occur faster if the battery is constantly charged at 100%. Lowering the charge thresholds for your battery, periodically resetting the battery gauge, using Maximum Lifespan mode, or using Battery Health Mode will help increase its lifespan."

-----


That's insightful, thanks.

But how do I know the battery reports honest numbers? If all these years spent dealing with hard disks tought me anything, it's that what's being reported by the device could be totally different from the reality :)

Perhaps some brands charge a premium for a "long lasting" battery whose only actual difference from a regular one is a firmware hack that keeps it at %80 charge? Can I actually know this?

-----


That reminds me of over-provisioning in SSDs

http://en.wikipedia.org/wiki/Write_amplification#Over-provis...

-----


If I was going to do this, it would be at the laptop end, because that's were I'm sitting.

How long until the power plug, or the receptacle in the laptop, wears out?

How expensive is labor to fix the receptacle, compared to the cost and convenience of replacing a battery?

Unless the OS manages this for me (and maybe it does behind my back?), I'm not going to bother. But many thanks for the interesting writeup.

-----


I read batteries wear off when plugged in in hot conditions, which is often the case for a running laptop. Can you confirm?

-----


Long term battery degradation happens when its membranes degrade. There are hundreds of variables involved. Temperature IS a variable. But I'm reluctant to outright confirm what you're saying because it may be misleading. Avoiding plugging in when hot could help in some situations, but it won't help in all, so it's not a categorical rule.

-----


Heat is a major cause of battery degradation, partially why I don't agree with constantly charging/discharging since it causes more heat.

Keep your laptop cool, perhaps even consider battery saving options while plugged in if you find it is generating too much heat.

Edit: A running laptop will cause heat, so shut it off when not using it. A plugged in laptop shouldn't create much more heat than a laptop running on battery power, if anything, the battery should be cooler when plugged in and fully charged (assumption made).

-----


On Linux and ThinkPads you can use acpi_call to set these tresholds https://wiki.archlinux.org/index.php/Tp_smapi#2nd_Option (the old tp_smapi way ceased to work about four years ago).

-----


tp_smapi still works fine on my T61?

-----


I meant laptops released four years ago.

-----


It'd be nice if the battery controller/charger had the intelligence to make these optimizations transparent to the end user. So present them with 100% or whatever, but in actuality, the battery is at 90%, most of the time it's plugged in, and so on.

-----


I thought this was actually standard operating procedure for laptop batteries (or really, anything using lithium batteries). Similarly, 0% is actually more like 5 or 10%.

If you actually deep discharge a lithium battery to 0%, think they'll sometimes have problems taking a charge again. You see this occasionally when someone has taken to 0% on the meter, then let it self-discharge on the desk for a long time.

-----


Yeah I thought so too. The parent comment seemed to indicate otherwise.

-----


This is exactly the pattern I've fallen into with the Apple Watch. It charges so fast, and my usage hasn't been that extreme. I charge it during showers and my son's bedtime, and I'm good to go.

-----


A lot of laptops allow for various trickle charging modes. Generally they stay charged between 90 and 100% (charges to 100 then wait until 90), some allow for charging to 80.

In my experience there can be memory effects when fully capping at 80% over the years, though.

-----


Li-ion batteries do not have a memory effect. LiFePO4 do, however.

-----


> plug in and let charge to 90%, unplug and use for a couple of hours, plug back in at 50% or so

Well isn't this what computers are good at? I thought modern computers had a microcontroller for doing this...

-----


Exceptional. Armed with this info, this will surely save me a ton of money over time, especially if I can get my employees to adopt this reasoning. I've been dying for this answer for years now.

-----


Having an employee micromanage this will actually cost you more money over time.

-----


Depending of the type of work your employees do, it might be frustrating. If you need CPU power you'll not get the full speed when unplugged.

Also unplugging/replugging is annoying, get a brand/model that already has the charging cap option and just ask to enable it.

-----


> 1) Lots of deep discharge cycles do negatively affect battery life. Try not to jump between 0% and 100% too much.

Great. Another reason to avoid barely-one-day batteries on phones. They'll die sooner!

-----


>plug in and let charge to 90%, unplug and use for a couple of hours, plug back in at 50% or so, rinse and repeat.

or set your power drivers to do it for you.

-----


> or set your power drivers to do it for you.

Pray tell me how. (Macbook Pro 2010.)

-----


It already exists. E.g. The Dell laptop I currently own already has it as part of some or other pre-installed software.

-----


Time to write an app to do that (possibly only for rooted phones), someone?

-----


That's assuming that devices don't already operate in this range of SOC within device...which I wouldn't believe to be true.

-----


Yes, I didn't (/don't) know about that. I believed the charging cycle would have become intelligent by now, but thought then this whole thread wouldn't come up if that was the case.

-----


this sounds like a problem begging for a software solution.. any reason this sort of functionality is left to the user stead automated by the device?

-----


What if you're mostly using the laptop near a power outlet? Wouldn't it be better to keep it plugged in to avoid charging/discharging the battery at all?

-----


No. Leaving a battery at 100% is bad for the battery's life. Just as bad as deep cycling all the time. Even if your laptop is stationary, knock the charger out once a day and let it run on battery power for a bit.

-----


I'd like to see some supporting info on this. It's not that I don't believe you— what you say sounds plausible enough, it's just that I'd rather understand why this is so.

-----


Do you have a citation for that?

-----


Check out Chester Simpson's work from Natl Semiconductor. I don't have a DOI available for you unfortunately, but Simpson is a great starting point.

-----

More

Applications are open for YC Winter 2016

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact

Search: