Civilization VI

I haven’t played Civilization VI yet. I am a fan of the series. But I have too many games and too little time, and I didn’t want to pay full price for yet another iteration of the same game. I was still waiting for the price to come down below $30 when I got the news that the full Civ 6 game has been ported to iOS. Yes, you need a newer iPad to play and it is battery-hungry, but it is the *full* Civ 6, not a toned down mobile version. That is pretty remarkable. So I downloaded the game for free, which lets you play 60 turns with the Chinese empire to see how it works. And then I balked at buying the full version for $60. I didn’t even want to pay that for the PC version, and for an iOS game that is very expensive.

So while I was still pondering what to do, I got another piece of news: You can this month get Civilization VI (PC version) plus 2 expansions plus a collection of other games in the Humble Bundle Monthly for $12. That is basically a subscription service where you pay $12 per month to get a bundle of games every month. But if you only want Civ 6 you can of course unsubscribe after 1 month. As this is the lowest I have ever seen Civ 6 go for, I ended up buying the game that way.

Not sure when I will get around to actually play it, I am still very busy with Zelda – Breath of the Wild. But as an opportunity to get Civ 6 cheap this is certainly worth mentioning. The offer is available until the end of the month.

Basic Understanding of RMI : JaVa – is not MaVa

RMI logo

The Remote Method Invocation(RMI) is an API that provides a mechanism to create distributed application in Java. RMI allows a Java object to invoke method on an object running on another machine. RMI provides remote communication between java programs.

—Watch the Video to understand “Why we need RMI ?”—-



Concept of RMI application

A RMI application can be divided into two parts,
1. Client  program
2. Server program.
Server program creates some remote object, make their references available for the client to invoke method on it. A Client program make request for remote objects on server and invoke method on them. Stub and Skeleton are two important objects used for communication with remote object.

Stub and Skeleton

components of RMI

Stub acts as a gateway for Client program. It resides on Client side and communicates with Skeleton object. It establishes the connection between remote object and transmit request to it. Skeleton object resides on the Server side.

Stub Operation:

  • Acts as proxy for remote object.
  • Marshall parameters (converting the data or the objects in-to a byte-stream).
  • Send request and parameters to server skeleton.
Skeleton operation:
  • UN-Marshall parameters(converting the byte-stream back to their original data or object).
  • Perform computation
  • Marshall method return.
  • Send return object to client stub
RMI Registry
RMI registry is a server where :
  • Servers can register their object.
  • Clients can find server objects and obtain a remote references. Using the remote reference we can then invoke the required method.
                             
Watch this video to understand basic Implementation of RMI


RMI IMPLEMENTATION

    RMI Architecture

    Creating simple RMI application involves following steps:

    • Define a remote interface.
    • Implementing remote interface.
    • create and start remote application
    • create and start client application

    Define a remote interface

    A remote interface specifies the methods that can be invoked remotely by a client. Clients program communicate to remote interfaces, not to classes implementing it. To be a remote interface, a interface must extend the Remote interface of java.rmi package.
    import java.rmi.*;
    public interface AddServerInterface extends Remote
    {
    public int sum(int a,int b);
    }

    Implementation of remote interface

    For implementation of remote interface, a class must either extend UnicastRemoteObject or use exportObject() method of UnicastRemoteObject class.
    import java.rmi.*;
    import java.rmi.server.*;
    public class Adder extends UnicastRemoteObject implements AddServerInterface
    {
    Adder()throws RemoteException{
    super();
    }
    public int sum(int a,int b) throws RemoteException
    {
    return a+b;
    }
    }

    Create Server and host rmi service

    You need to create a server application and host rmi service Adder in it. This is done using rebind() method of java.rmi.Naming class. rebind() method takes two arguments, first represent the name of the object reference and second argument is reference to instance of Adder
    import java.rmi.*;
    import java.rmi.registry.*;
    public class Server{
    public static void main(String args[]){
    try{
    AddServerInterface addService=new Adder();
    Naming.rebind("Sum",addService);
    //addService object is hosted with name Sum

    }catch(Exception e){System.out.println(e);}
    }
    }

    Create client application

    Client application contains a java program that invokes the lookup() method of the Naming class. This method accepts one argument, the rmi URL and returns a reference to an object of type AddServerInterface. All remote method invocation is done on this object.
    import java.rmi.*;
    public class Client{
    public static void main(String args[]){
    try{
    AddServerInterface st=(AddServerInterface)Naming.lookup("rmi://localhost/Sum");
    System.out.println(st.Sum(25,8));
    }catch(Exception e){System.out.println(e);}
    }
    }

    Steps to run this RMI application

    • compile all the java files
      javac *.java
    • Start RMI registry
      start rmiregistry
    • Run Server file
      java Server
    • Run Client file in another command prompt pass localhost at run time
      java Client localhost
    Goals of RMI
    • To minimize the complexity of applications.
    • Minimize the difference between working with local and remote objects
    • Make writing reliable distributed applications as simple as possible

    Would you like learn Java and get Certified from Oracle ?

    XCOM 2: War of the Chosen

    Steam sales are so frequent that I rarely buy games that aren’t at least 50% off. Usually I just ignore the hype that surrounds new games, and just wait for the inevitable price decrease. More often than not the game a year later is not only half price, but also better than at release due to patches. Having said that, there are a few exceptions where I want to have a game on release day, at full price. The most recent example of that being XCOM 2: War of the Chosen for €39.99.

    Now there are two main things to say about War of the Chosen. The first is that it is a very good expansion of the original XCOM 2 game, providing a lot of fresh fun with new maps, new aliens to fight, and new game mechanics. The second is that it is after all only an expansion, and to many people will not be worth 40 bucks. The expansion really improves the basic game with a wide range of options, but at two thirds of the price of a triple A game the thing appears rather expensive. Waiting for example for the Steam Christmas sale and hoping War of the Chosen will be cheaper then would be a completely rational decision.

    One thing I liked about War of the Chosen was the advanced options menu, which now gives a wider range of choices than the original basic options menu. You can for example decide that you don’t like to be rushed through the game, and double the timer of the avatar project and/or of individual missions. Of course that does make the game easier, but not everybody appreciates the sort of difficulty which arises only from being forced to rush through content.

    From the new monsters I probably like the zombies the most. They appear in large groups, but have a special feature where you get an additional action if you kill one. That allows for very satisfying chain kills, but carries the risk of you missing your shot and being overrun by a horde of zombies. I am less a fan of the new “chosen” aliens, which can be even more annoying than the previously patched in “rulers”.

    The new factions which give you access to new soldier classes with a different system of talent tree are interesting. You probably appreciate them more if you always only used the 4 original classes. However I already used mods to have a wider choice of classes, and so that was less a drawback of the original game for me.

    I started a new campaign because of War of the Chosen. However I can’t say I’m very much hooked. I have a range of other projects in my life currently, and playing XCOM 2 isn’t always on top of the list of my priorities. That is especially true on weekdays after work, as I find that the game requires some concentration. If I’m too tired I prefer more casual games, or even passive entertainment via Netflix. So I probably overpaid for the expansion, even if I don’t really regret it.

    The rise of Foxconn and Terry Gou, and shaking the Apple shackles

    Fortune

    Foxconn has had an astonishing rise in the electronics industry. The Taiwanese company has gone beyond electronics manufacturing and assembly to become one of largest companies in the world.

    Fortune ranks as the world’s 27th largest company, but just how big can Foxconn become?

    The Foxconn

    Since the iPhone’s introduction in 2007, Apple has relied on the company known as Hon Hai Precision Industry, which trades as Foxconn Technology Group, to assemble its devices at plants in China and Taiwan.

    Foxconn is the largest contract manufacturer in the world. Established in 1974 by the legendary Terry Gou, who still retains control, its workforce of more than 700,000 employees (rising to over one million during busy times) assembles components for devices including the iPad, Kindle, Playstation 4, Xbox One and Nintendo Switch, along with TVs.

    The company is a true empire, with at least nine major business arms via a string of subsidiaries and associated companies in fields like printed circuit board manufacturing, touch module and battery module manufacturing, nanotechnology, connector manufacturing. Subsidiary company FIH Mobile is devoted to non-Apple phone manufacturing.

      Annual Revenue Annual Net income Operating margin Number of employees
    Foxconn US$136.12 billion (2016) US$4.460 billion (2016) 5.83% (Sept. 2017) 700,000 (estimated)

    Apple dominates Foxconn’s facilities and bottom line, receiving millions of devices (mostly iPhones) every quarter from the company. The two companies are the biggest buyers of tech in the world, spending more than $250 billion last year on a cost-of-goods-sold basis.

    Apple is Foxconn’s most significant client by some margin, dating back to 2000 when Foxconn won an order to produce Apple’s new iMacs. It’s also been an infamous partnership.

    The manufacturer caught the attention of the world’s media following a spate of worker suicides in 2010, mostly in the giant Longhua complex where iPhones are made, and where workers also live.

    Nets were installed outside many buildings, and counsellors were hired. Apple came under fire for contracting work to a company supposedly making its employees suffer.

    “Foxconn is not a sweatshop. It’s a factory. But my gosh, they have restaurants and movie theatres[…] For a factory, it’s a pretty nice factory. If you count the attempted suicides, they’ve had 13 this year. You know, they have 400,000 people in that place[…] That’s still under the U.S. suicide rate […] but it’s really troubling,” said Steve Jobs in an interview with Walt Mossberg and Kara Swisher in 2010.

    Foxconn didn’t suffer much from the media spotlight. The company managed to maintain and grow its fortunes, and its relationship with Apple.

    In recent years, reports have continued to spotlight the ambitions of Foxconn’s maverick founder and his company. One of the most recent, in the Nikkei Asian Review, published a rare in-depth conversation with Gou, focused on the attempted purchase of Toshiba’s memory chip business in Japan for as high as $19.5 billion, the ‘big brand’ ambitions of the company, and Gou himself.

    It is clear that assembling iPhones is not and has not been enough for Terry Gou for some time.

    Japan Times

    ‘The Chairman’ Terry Gou

    Gou is the heart and soul of the business he’s driven since 1974, and remains in tight-control of the company. It’s growth is a reflection of his tenacity. He recently won control of Osaka-based Sharp, the first ever foreign takeover of a Japanese electronics company. Sharp was Japan’s largest maker of liquid-crystal displays at the time, and a major supplier to Apple for pre-iPhone X devices.

    In its detailed post-mortem of the deal, Bloomberg described Gou as “relentless, totally relentless.”

    A profile from BusinessWeek includes many of Gou’s tenacious moments in working to create his 43-year-old company that started from humble beginnings, via a $7,500 loan from his mother.

    Stories of “Terry the Talker,” a man so determined that he could convince anyone to work with him, abound. He supposedly convinced representatives from Compaq to order computer casings from Hon Hai— the company had only ever made connectors at this point— just by drawing out some plans in the parking lot of the Longhua grounds.

    Foxconn’s appetite for growth remains driven and focused by the 67-year-old Gou. While he has reportedly spoken of a plan for retirement, there isn’t a clear successor for the company, and a search has apparently been ongoing for at least a decade.

    Gou remains firmly at the helm, and is actually pretty youthful compared to others in the industry: Canon Chairman and CEO Fujio Mitarai is 82. Morris Chang, a legendary figure in Taiwan’s chip industry, returned to TSMC as Chairman and CEO in 2009 at 78. He’s 86 now and still Chairman.

    Foxconn has reportedly seen high-turnover as executives struggle to match Gou’s expectations, commitment, and leadership style.

    Many Taiwanese companies are family controlled, and have faced or still face a succession crisis, including computer manufacturers Acer and Quanta. Sophia Cheng, former head of research at Merrill Lynch Taiwan Ltd., said a major criteria in judging company performance in Taiwan is how well the first-generation of leadership plan for succession by the next generation.

    Foxconn has reportedly seen high-turnover as executives struggle to match Gou’s expectations, commitment, and leadership style. Gou reportedly does not delegate, retaining tight control of all aspects of the business. Gou’s temper is also famous, and has been reported on for decades.

    According to a former high-level executive, “The better you do, the more difficult he is to please.”

    Gou’s five children have reportedly shown little interest in the company, or are too young.

    The margin troubles, and Apple

    Foxconn’s formidable growth on the back of continued success and delivery for Apple isn’t straight-forward. Revenue remains strong, but profitability dwells in a narrowing margin:

    • Foxconn’s gross profit margin, according to the company’s financial reports, has fallen to as low as 5.83%. (Major electronics players that utilise Foxconn such as Apple, Sony, and Nintendo have margins of around 40%.)
    • In 2016, Apple alone accounted for 54% of Foxconn’s revenue of US$142 billion.

    In the most recent financial release by Foxconn, the company experienced a downturn in revenue that analysts suggested was due to iPhone X supplier problems.

    Foxconn’s model has been to sell its manufactured parts for customer devices, and do the final assembly at a thin profit, or even a loss.

    Foxconn may be building all the iPhones, but Apple’s profit margins are substantially higher.

    Gou is famous for focusing on a five-year plan, and there are few better placed to see both short and long-term trends in the industry, but well-reported delays in iPhone X production due to third-party component issues hurt not just Apple and their consumers, but Foxconn as well. Initial sales of the iPhone 8 range were tepid, too, and inventories are rising.

    Apple looks safe to to continue their hot streak, selling more than 40 million iPhones over the last 12 quarters, but global smartphone sales are slowing. India is contributing major new demand, but for low to mid-range devices with less of a margin.

    Another headwind is the growth of Chinese OEM Huawei, which is now the third-largest manufacturer of smartphones, and handles manufacturing and assembly internally.

    Investors aren’t convinced about the iPhone X’s sales power at all, with Foxconn’s shares tumbling some 20 percent from the September 12th Apple keynote, while Apple itself is up around eight percent from that date in a serious bull market.

    Apple vs Foxconn stock

    Apple vs Foxconn stock (via Google Finance)

    A perceived hiccup to Apple results in significant pain to Foxconn, but changing this course is not simple.

    “Foxconn still cannot do without Apple in the future. Apple orders have become too big to lose for Foxconn,” Yuanta’s Vincent Chen told the Nikkei.

    The broadening of the brand

    While the Nikkei published that Foxconn may seek to develop first-party brands, there is considerable doubt about this suggested approach. According to an analyst familiar with the company, who spoke to us on condition of anonymity, there is considerable doubt about this suggested approach.

    “Not competing with customers has been a key part of Foxconn’s strategy … and in most cases it has more to lose than gain in putting its brand into competition with those of its customers,” said the analyst. Foxconn didn’t immediately respond to our request for comment, so their ambitions in this area remain unclear.

    Foxconn controls Sharp, which releases mobile devices in China like the bezel-less Sharp Aquos S2. It also produces a range of InFocus mobile phones, under the US-company InFocus brand. Via FIH Mobile, it owns the rights to manufacture low-end phones under the Nokia brand too.

    Foxconn controls Japanese electronics giant Sharp, which designs phones and TVs, among others.

    Aside from investments in emerging companies, which are often made to secure relationships as much as technology, Foxconn’s also a major participant in Softbank’s Vision Fund, alongside Qualcomm, Apple, Saudi Arabia’s main sovereign wealth fund, and others.

    Foxconn’s recent acquisitions and investments are varied. It acquired Calgary-based SMART Technologies, as well as Didi Chuxing, China’s main ride-sharing app, selfie phone maker Meitu, and 360 degree camera maker Lytro. It also made sizeable investments in the Chinese AI startup Megvii and the Bitcoin startup Abra.

    In partnership with Tencent and Harmony New Energy Auto, a luxury-car dealer, the company founded autonomous car startup Future Mobility, aiming have all-electric and autonomous cars by 2020.

    In the US, a major agreement has been signed between the state of Wisconsin and Foxconn for the company to invest up to $10 billion, for a 13,000-job development, likely focused on LCD-panel production for TV. The plant will build 10.5G LCD substrates (display panel sheets), able to produce 8K resolutions on panels as big as 70, 80 and 100-inch TV screens.

    The future for Foxconn: TVs, OLED, and more than electronics

    Foxconn’s 10.5G LCD plant foray into Wisconsin is a risk, although Gou has secured significant (and controversial) tax breaks and leniency from the state of Wisconsin.

    Bloomberg Gadfly columnist Tim Culpan opined that the Foxconn development would be a risk for both Wisconsin and the company. The relatively high supply of quality LCD panels in Asia— including Foxconn’s own twin 10.5G plant being built in southern China— will hurt margins, and the huge breaks given to Foxconn which may not be paid back to Wisconsin for decades.

    One obvious area Foxconn is lacking is in true OLED capacity in both TVs and smartphones, where Apple has shifted with the iPhone X. The control of Sharp has added some capacity but nothing of the type or quality that could offer a new supply for Apple’s speciality OLED screens.

    Foxconn is lacking OLED capacity in both TVs and smartphones. Control of Sharp has added some capacity but Samsung and LG are skeptical that Sharp could even start mass-producing OLED as late as 2020.

    To join Samsung in supplying OLED panels to Apple, Foxconn would have to spend at least $11.5 billion to build a latest generation 6G OLED plant, which would produce approximately 250 million 6-inch screens per year, tooled from a supplier such as Canon Tokki, according to an analyst who wished to remain anonymous. A project like that would also cause long lead-times, and bring significant technological risk.

    “Besides Samsung Display, Apple has been supporting LG Display as the leading alternative OLED supplier for its iPhone,” WitsView research vice president Eric Chiou, told us via email.

    “Foxconn-Sharp lack the experience in volume production of OLED panels and have limited capital to invest in this area. Overcoming these difficult challenges will not happen within a short-term period. Pursuing OLED for them is not an efficient use of resources given the time and financial constraints,” said Chiou.

    Both Samsung and LG are skeptical that Sharp could even start mass-producing OLED as late as 2020.

    Chiou says the focus on TVs by Foxconn-Sharp is far more significant for the company, explaining that the high-price of TVs in general can be major contributors to overall revenue growth. “With its TV business reaching a new level of economies of scale and cost competitiveness, the Foxconn Group can receive an even greater volume of ODM [original design manufacturer] orders and will not be limited to working for the Sharp brand,” said Chiou.

    Foxconn is looking to expand into TVs, internet of things, big data, and cloud computing.

    Digitimes reported that Foxconn and China-based flat panel maker BOE Technology will compete for Japan Display, a currently unprofitable LCD technology joint venture by Sony, Toshiba, and Hitachi.

    Hinting at further ambitions, Foxconn may be aiming to receive Apple Watch assembly orders in 2018 as well.

    Foxconn told the Nikkei that aside from mobile devices and advanced TV displays, opportunities present across: ‘the internet of things, big data, cloud computing, “smart lives,” industry 4.0 automation, and electric vehicles’.

    Foxconn is also said to be exploring manufacturing outside pure electronics, with healthcare, automobile and artificial intelligence sectors all targets.

    So, how big?

    Gou and Apple will remain the two outstanding pillars of Foxconn’s success, and any upheaval to Gou’s rein or Apple’s relationship to the company threatens its continuing growth.

    The company is betting heavily on electric vehicles, TV, and continuing to invest in a range of start-ups and bigger companies to win new work and make sure they’re part of the next big thing. Contract assembly will continue to drive Foxconn’s bottom line, but high technology and brand value might deliver its next major leap in growth.

    Remove App Stories from your Facebook Timeline

    The burden to control if an app can post on the Timeline falls on the shoulder of the user i.e.you. That’s theory, but in practice the vast majority of Facebook users don’t bother taking the time to review the app install screen.

    So, they just click OK and in most cases that means giving an app in question permission to post its activities on your Timeline.

    While the integration of an app with Facebook for login is convenient, doing so may occasionally come with the side-effect of letting these third-party apps drown your Timeline with notifications, which directly leads to your friends’ News Feed being bombarded by status updates.

    So if you are the one  who don’t want to see this on your Facebook app’s timeline, just follow the below steps to remove it.

    Step 1

    Open up Facebook and click on the Down Arrow button  located right next to the Quick Help button.

    Step 2

    Select the Activity Log option from the drop down menu as shown above and click on the All Apps tab located on the Filters menu as shown below.

    Step 3

    To delete an app update, all you need to do is to click on the Edit button and select the Delete option. If you would prefer to stop the app from posting updates permanently, you can choose the Remove [App Name] option instead.

    This way you can edit your timeline.

    Want to learn Data Analytics?