Ethan's Blog


  • Home

  • Archives

  • Tags

  • Search

基础编程模型

Posted on 2019-08-20

我们学习算法的方法是用 Java 编程语言编写的程序来实现算法,这样做是出于以下原因:

  • 程序是对算法精确、优雅和完全的描述;
  • 可以通过运行程序来学习算法的各种性质;
  • 可以在应用程序中直接使用这些算法;

缺点:使用特定的编程语言,会使分离算法的思想和实现细节变得困难。

我们把描述和实现算法所用到的语言特性、软件库和操作系统特性总称为基础编程模型。

Java 程序的基本结构

一段 Java 程序(类)或者是一个静态方法(函数)库,或者定义一个数据类型,会用到下面七种语法,它们是 Java 语言的基础,也是大多数现代语言所共有的:

  • 原始数据类型:在计算机程序中精确地定义整数、浮点数和布尔值等;
  • 语句:声明、赋值、条件、循环、调用和返回;
  • 数组:多个同种数据类型的值的集合;
  • 静态方法:封装并重用代码,使我们可以用独立的模块开发程序;
  • 字符串:一连串的字符,Java 内置了对它们的一些操作;
  • 标准输入/输出:程序与外界联系的桥梁;
  • 数据抽象:使我们可以定义非原始数据类型,进而支持面向对象编程;

要执行一个 Java 程序,首先需要用 javac 命令编译它(*.class),然后再用 java 命令运行它。

Read more »

Meetings

Posted on 2019-08-18

Running a face-to-face meeting

So, let’s get started.

Useful Tips

  • Go through the agenda at the start of the meeting and check no items are missing.
  • Ensure good timekeeping during the meeting, making sure that participants stick to the agenda and don’t get sidetracked.
  • Control the discussion, making sure all participants contribute where relevant and that no one person dominates the whole meeting.
  • Summarize key decisions at the end of each agenda point.
Read more »

Telephoning

Posted on 2019-08-15

Cold calling

Do you have a moment to speak to me?

Useful Tips

When cold calling (approaching prospective clients or customers for the first time), keep the following points in mind:

  • Be clear and concise about who you are and the purpose of the call.
  • Use questions to help and guide the person you are calling.
  • Always use titles (such as Dr., Mr., and Ms.) and never first names.
  • Don’t be offended by hostile behavior. It’s not personal.
Read more »

Mesos - 优秀的集群资源调度平台

Posted on 2019-08-12

Mesos 项目是源自 UC Berkeley 的对集群资源进行抽象和管理的开源项目,类似于操作系统内核,使用它可以很容易地实现分布式应用的自动化调度。同时,Mesos 自身也很好地结合和支持了 Docker 等相关容器技术,基于 Mesos 已有的大量应用框架,可以是实现用户应用的快速上线。

简介

Mesos 可以将整个数据中心的资源(包括 CPU、内存、存储、网络等)进行抽象和调度,使得多个应用同时运行在集群中分享资源,并无须关心资源的物理分布情况。
如果把数据中心的集群资源看作一台服务器,那么 Mesos 要做的事情,其实就是今天操作系统内核的职责:抽象资源 + 调度任务;Mesos 拥有许多引人注目的特性,包括:

  • 支持数万个节点的大规模场景(Apple、Twitter、eBay 等公司使用);
  • 支持多种应用框架,包括 Marathon、Singularity、Aurora 等;
  • 支持 HA(基于 ZooKeeper 实现);
  • 支持 Docker、LXC 等容器机制进行任务隔离;
  • 提供了多个流行语言的 API,包括 Python、Java、C++ 等;
  • 自带了简洁易用的 WebUI,方便用户直接进行操作。

Mesos 自身只是一个资源抽象的平台,要使用它往往需要结合运行在其上的分布式应用(framework)。

Read more »

Networking

Posted on 2019-08-12

Starting a conversation

Where do you come from then?

Useful Tips

  • Successful small talk is not about saying brilliant things. It’s about commenting on and asking about ordinary things with conviction, interest, and enthusiasm.
  • Match the mood of your conversation partner. If they are smiling and cheerful, be ready to laugh. If they seem serious, be serious too.
  • Ask where your partner comes from and, when somebody asks you the same thing, be ready to add something interesting about the place.
  • Ask what your partner does and, when you’re asked the same question, don’t only give a title. Add a small piece of interesting or amusing information about the job or responsibility.
Read more »
1…444546…54
necusjz

necusjz

270 posts
16 tags
© 2016 - 2026 necusjz
Powered by Hexo
Theme - NexT.Mist